seq_vector Class Reference
[Data Grids and Sequences]


Detailed Description

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 is modeled after ublas::vector and as such can be used in a similar fashion to other ublas::vectors.


Member Typedef Documentation

typedef unbounded_array<value_type> array_type
typedef vector_reference<self_type> closure_type
typedef const vector_reference<const self_type> const_closure_type
typedef indexed_const_iterator<self_type, dense_random_access_iterator_tag> const_iterator
typedef const reference const_reference
typedef reverse_iterator_base<const_iterator> const_reverse_iterator
typedef array_type::difference_type difference_type
typedef array_type::size_type size_type
typedef dense_tag storage_category
typedef double value_type

Constructor & Destructor Documentation

virtual ~seq_vector (  )  [inline, virtual]

Virtual destructor.

seq_vector ( size_type  size  )  [inline, protected]

Initializes data container.

seq_vector ( const self_type other  )  [inline, protected]

Copies data from another seq_vector object.

Parameters:
other The object to be copied.

Member Function Documentation

const_iterator begin (  )  const [inline]

Iterators needed for BOOST_FOREACH.

virtual self_type* clone (  )  const [pure virtual]

Create a copy using a reference to the base class.

Implemented in seq_data, seq_linear, and seq_log.

array_type data (  )  const [inline]

Convert sequence into a normal C++ array.

const_iterator end (  )  const [inline]
const_iterator find ( size_type  i  )  const [inline]

Find iterator call.

virtual size_type find_index ( value_type  value  )  [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.

Parameters:
value Value of the element to find.
Returns:
Index of the largest value that is not greater than the argument.

Implemented in seq_data, seq_linear, and seq_log.

const_reference increment ( size_type  index  )  const [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.

Parameters:
index The element number to retrieve (zero indexed).
Returns:
The difference between the element at "index" and the element at "index+1".
virtual const_reference operator() ( size_type  index  )  const [inline, virtual]

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.

Parameters:
index The index of element to retrieve (zero indexed).
Returns:
The value at the indexed element.
const_reference operator[] ( size_type  index  )  const [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),

Parameters:
index The element number to retrieve (zero indexed).
Returns:
The value between the "index" element.
const_reverse_iterator rbegin (  )  const [inline]

Reverse iterators needed for data_grid _axes call.

const_reverse_iterator rend (  )  const [inline]
size_type size (  )  const [inline]

Returns the number of elements in this sequence.


Member Data Documentation

array_type _data [protected]

Cache of sequence values.

array_type _increment [protected]

Cache of increment values.

size_type _max_index [protected]

Largest valid index number (one less than size() ).


Generated on 4 May 2015 for USML by  doxygen 1.6.1