USML
seq_linear Class Reference
Collaboration diagram for seq_linear:

Detailed Description

Sequence defined by an evenly spaced grid of points.

Designed to serve the same function as the a=1:2:N Matlab construct.

Member Typedef Documentation

typedef vector_reference<self_type> closure_type
typedef const vector_reference<const self_type> const_closure_type
typedef seq_linear self_type
private

Constructor & Destructor Documentation

virtual ~seq_linear ( )
inlinevirtual

Virtual destructor.

seq_linear ( value_type  first,
value_type  increment,
size_type  size 
)
inline

Construct sequence using first value, increment, and size.

Parameters
firstValue at start of sequence.
incrementSpacing between elements.
sizeNumber of elements in this sequence.
seq_linear ( value_type  first,
value_type  increment,
int  size 
)
inline

Construct sequence using first value, increment, and size.

Parameters
firstValue at start of sequence.
incrementSpacing between elements.
sizeNumber of elements in this sequence.
seq_linear ( value_type  first,
value_type  increment,
value_type  last 
)
inline

Construct sequence using first value, increment value, and last value.

If last value is not part of the sequence, the sequence will end on a value <= last. All sequences constructed in this way have at least a single value.

Parameters
firstValue at start of sequence.
incrementSpacing between elements.
lastValue at end of sequence.
seq_linear ( const seq_linear copy)
inline

Copies data from another sequence object.

Parameters
copyThe object to be copied.

Member Function Documentation

virtual seq_vector* clone ( ) const
inlinevirtual

Create a copy using a reference to the base class.

Implements seq_vector.

virtual size_type find_index ( value_type  value)
inlinevirtual

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.

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

Implements seq_vector.

void initialize ( value_type  first,
value_type  increment,
size_type  size 
)
inlineprivate

Construct sequence using first value, increment, and size.

Parameters
firstValue at start of sequence.
incrementSpacing between elements.
sizeNumber of elements in this sequence.