USML
|
A read-only, monotonic sequence of values.
Designed to be used as an interpolation axis for a multi-dimensional data sets. Fast interpolation algorithms require an ability to quickly lookup an axis index appropriate given a floating point axis value.
This class caches data values and increments in ublas::vector<> objects. This allow frequently used operations (ex: operator[] and increment()) access to inlined methods and cached values instead of computed results. Sub-classes often store an additional representation of this data that is used to implement fast versions of the find_index() method.
This design uses zero_vector<T> as a model of how to implement a read-only uBLAS vector. Implements subclass methods as virtual functions, instead of traits, so that they can be resolved at run-time. Run-time resolution is critical to reading sequences from netCDF data files.
typedef vector<value_type>::array_type array_type |
typedef vector_reference<self_type> closure_type |
typedef const vector_reference<const self_type> const_closure_type |
typedef vector<value_type>::const_iterator const_iterator |
typedef vector<value_type>::const_reference const_reference |
typedef reverse_iterator_base<const_iterator> const_reverse_iterator |
typedef vector<value_type>::difference_type difference_type |
typedef vector<value_type>::const_reference reference |
|
private |
typedef vector<value_type>::size_type size_type |
typedef vector<value_type>::storage_category storage_category |
typedef double value_type |
|
inlineprotected |
Initialize data caches.
|
inlineprotected |
Copies data from another seq_vector object.
copy | The object to be copied. |
|
inlinevirtual |
Virtual destructor.
|
inline |
Create iterator for the beginning of sequence.
Required for inheritance from vector_container.
|
pure virtual |
Create a copy using a reference to the base class.
Implemented in seq_data, seq_log, and seq_linear.
|
inline |
Convert seqence into a normal C++ array,.
|
inline |
Create iterator for the end of sequence.
Required for inheritance from vector_container.
|
inline |
Create iterator for a random position in the sequence.
Required for inheritance from vector_container.
|
pure virtual |
Search for a value in this sequence.
If the value is outside of the legal range, the index for the nearest endpoint will be returned.
This reverse lookup is the principle feature that distinguishes seq_vector objects from ordinary vectors.
value | Value of the element to find. |
Implemented in seq_data, seq_log, and seq_linear.
|
inline |
Retrieves the increment between two elements in this sequence.
If the index is outside of the range [0,size-1), the value for the nearest endpoint will be returned.
index | The element number to retrieve (zero indexed). |
|
inlinevirtual |
Retrieves the value at a specified index in the sequence in the safest way possible.
If the index is outside of the range [0,size), the value for the nearest endpoint will be returned.
index | The index of element to retrieve (zero indexed). |
|
inline |
Retrieves the value at a specified index in the sequence in the fastest way possible.
Problems will occur if the index is outside of the range [0,size-1),
index | The element number to retrieve (zero indexed). |
|
inline |
Create iterator for the beginning of reverse sequence.
Required for inheritance from vector_container.
|
inline |
Create iterator for the end of reverse sequence.
Required for inheritance from vector_container.
|
inline |
Returns the number of elements in this sequence.
|
protected |
Cache of sequence values.
|
protected |
Cache of increment values.
|
protected |
Largest valid index number (one less than _size).
|
protected |
Number of elements in the sequence.