fixed compile issues

This commit is contained in:
jkriege2 2023-08-15 19:08:19 +02:00
parent 49d79e610d
commit 11abcd1e77
2 changed files with 2 additions and 7 deletions

View File

@ -54,7 +54,7 @@ int main(int argc, char* argv[])
//size_t YCol=datastore->addColumn("cos curve: y-data");
size_t YCol2=datastore->addColumn("cos curve: y-data");
//std::transform(datastore->begin(XCol), datastore->end(XCol), datastore->backInserter(YCol), cos);
std::transform(datastore->begin(XCol), datastore->end(XCol), datastore->backInserter(YCol2), cos);
std::transform(datastore->begin(XCol), datastore->end(XCol), datastore->backInserter(YCol2), [](double a) { return cos(a); });
// 2.4. Just for fun we can now sort the data:
//std::sort(datastore->begin(YCol), datastore->end(YCol));
// or replace any value <-0.5 with 1:

View File

@ -1760,7 +1760,7 @@ class JKQTPColumnIterator {
}
/** \brief dereferences the iterator, throws an exception if the iterator is invalid (see isValid() ) or the value does not exist in the column */
inline reference operator*() {
inline reference operator*() const {
JKQTPASSERT(col_!=nullptr && pos_>=0 && pos_<static_cast<int>(col_->getRows()));
return col_->at(pos_);
}
@ -1772,11 +1772,6 @@ class JKQTPColumnIterator {
JKQTPASSERT(col_!=nullptr && pos_+off>=0 && pos_+off<static_cast<int>(col_->getRows()));
return col_->at(pos_+off);
}
/** \brief dereferences the iterator, throws an exception if the iterator is invalid (see isValid() ) or the value does not exist in the column */
inline const_reference operator*() const {
JKQTPASSERT(col_!=nullptr && pos_>=0 && pos_<static_cast<int>(col_->getRows()));
return col_->at(pos_);
}
/** \brief comparison operator (less than)
*
* rules: