nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView Class Reference
This class represents a view on the values within one timeseries. More...
#include <TimeSeries.h>
Public Member Functions | |
ValueType | operator[] (unsigned int index) const |
Index-based read access. | |
void | set (unsigned int index, ValueType value) |
Sets the value at specified index to a new value. | |
void | remove (unsigned int index) |
unsigned int | numElements () const |
ValueType | getElement (unsigned int elementIndex) const |
void | setElement (unsigned int elementIndex, ValueType value) |
Change the value of an element. | |
void | transform (Mapping< ValueType, ValueType > m) |
Apply an element-wise in-place transformation. | |
template<typename OutType > | |
TimeSeries< TimestampType, OutType, strictOrdering > | map (Mapping< ValueType, OutType > m) const |
Apply an element-wise transformation. | |
ViewIterator< ValueType > | begin () const |
Returns an STL-compliant (read-only) iterator pointing to the first value. | |
ViewIterator< ValueType > | end () const |
Returns an STL-compliant (read-only) iterator pointing one position after the last element. | |
Friends | |
class | TimeSeries< TimestampType, ValueType, strictOrdering > |
Detailed Description
template<typename TimestampType, typename ValueType, bool strictOrdering = false>
class nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView
This class represents a view on the values within one timeseries.
It allows index-based access and manipulation of the timestamps, as well as Collection::map
and Collection::transform operations. This class cannot be created or assigned manually, but can only be used via the TimeSeries::values
instance.
Definition at line 402 of file TimeSeries.h.
Member Function Documentation
ViewIterator<ValueType> nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::begin | ( | ) | const [inline] |
Returns an STL-compliant (read-only) iterator pointing to the first value.
Definition at line 473 of file TimeSeries.h.
ViewIterator<ValueType> nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::end | ( | ) | const [inline] |
Returns an STL-compliant (read-only) iterator pointing one position after the last element.
Definition at line 479 of file TimeSeries.h.
ValueType nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::getElement | ( | unsigned int | elementIndex | ) | const [inline, virtual] |
- Parameters:
-
elementIndex between zero and numElements()-1
- Returns:
- Respective element in collection
Implements nemo::Collection< ValueType >.
Definition at line 446 of file TimeSeries.h.
TimeSeries<TimestampType,OutType,strictOrdering> nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::map | ( | Mapping< ValueType, OutType > | m | ) | const [inline] |
Apply an element-wise transformation.
The collection itself is not changed, but a new collection is returned that contains the results. Return values of implementing classes should be covariant: for instance MathVector<T>::map() returns a MathVector<OutType>.
Reimplemented from nemo::Collection< ValueType >.
Definition at line 459 of file TimeSeries.h.
unsigned int nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::numElements | ( | ) | const [inline, virtual] |
- Returns:
- Number of elements in a collection
Implements nemo::Collection< ValueType >.
Definition at line 443 of file TimeSeries.h.
ValueType nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::operator[] | ( | unsigned int | index | ) | const [inline] |
Index-based read access.
Definition at line 421 of file TimeSeries.h.
void nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::remove | ( | unsigned int | index | ) | [inline] |
Definition at line 435 of file TimeSeries.h.
void nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::set | ( | unsigned int | index, | |
ValueType | value | |||
) | [inline] |
Sets the value at specified index to a new value.
Definition at line 429 of file TimeSeries.h.
void nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::setElement | ( | unsigned int | elementIndex, | |
ValueType | value | |||
) | [inline, virtual] |
Change the value of an element.
- Parameters:
-
elementIndex between zero and numElements()-1 value New value for respective element
Implements nemo::Collection< ValueType >.
Definition at line 449 of file TimeSeries.h.
void nemo::TimeSeries< TimestampType, ValueType, strictOrdering >::ValueView::transform | ( | Mapping< ValueType, ValueType > | map | ) | [inline, virtual] |
Apply an element-wise in-place transformation.
Each element e is replaced by map(e).
Implements nemo::Collection< ValueType >.
Definition at line 452 of file TimeSeries.h.
Friends And Related Function Documentation
friend class TimeSeries< TimestampType, ValueType, strictOrdering > [friend] |
Definition at line 414 of file TimeSeries.h.
The documentation for this class was generated from the following file:
- nemo/TimeSeries.h
Generated on Mon Feb 25 12:49:59 2013 for NemoMath by 1.6.3