SmallVector< t_length > Class Template Reference

Low-overhead vector if length is known at compile time. More...

Inheritance diagram for SmallVector< t_length >:
[legend]
Collaboration diagram for SmallVector< t_length >:
[legend]

List of all members.

Public Member Functions

double get (index_t i) const
 Gets a value to the i'th element of this vector (convenient when you have a pointer to a vector).
double get (index_t i) const
 Gets a value to the i'th element of this vector (convenient when you have a pointer to a vector).
index_t length () const
 The number of elements in this vector.
index_t length () const
 The number of elements in this vector.
double & operator[] (index_t i)
 Gets a mutable reference to the i'th element of this vector.
double operator[] (index_t i) const
 Gets the i'th element of this vector.
double & operator[] (index_t i)
 Gets a mutable reference to the i'th element of this vector.
double operator[] (index_t i) const
 Gets the i'th element of this vector.
const double * ptr () const
 A pointer to the C-style array containing the elements of this vector.
double * ptr ()
 A pointer to the C-style array containing the elements of this vector.
const double * ptr () const
 A pointer to the C-style array containing the elements of this vector.
double * ptr ()
 A pointer to the C-style array containing the elements of this vector.

Detailed Description

template<int t_length>
class SmallVector< t_length >

Low-overhead vector if length is known at compile time.

Definition at line 1076 of file matrix.h.


Member Function Documentation

template<int t_length>
double SmallVector< t_length >::get ( index_t  i  )  const [inline]

Gets a value to the i'th element of this vector (convenient when you have a pointer to a vector).

This is identical to the array subscript operator, except for the following reason:

 void FooBar(Vector *v) {
    v->get(0) // much easier to read than (*v)[0]
 }

Reimplemented from GenVector< double >.

Definition at line 1109 of file matrix.h.

template<int t_length>
double SmallVector< t_length >::get ( index_t  i  )  const [inline]

Gets a value to the i'th element of this vector (convenient when you have a pointer to a vector).

This is identical to the array subscript operator, except for the following reason:

 void FooBar(Vector *v) {
    v->get(0) // much easier to read than (*v)[0]
 }

Reimplemented from GenVector< double >.

Definition at line 1109 of file matrix.h.

template<int t_length>
index_t SmallVector< t_length >::length (  )  const [inline]

The number of elements in this vector.

Reimplemented from GenVector< double >.

Definition at line 1087 of file matrix.h.

template<int t_length>
index_t SmallVector< t_length >::length (  )  const [inline]

The number of elements in this vector.

Reimplemented from GenVector< double >.

Definition at line 1087 of file matrix.h.

template<int t_length>
double& SmallVector< t_length >::operator[] ( index_t  i  )  [inline]

Gets a mutable reference to the i'th element of this vector.

Reimplemented from GenVector< double >.

Definition at line 1104 of file matrix.h.

template<int t_length>
double SmallVector< t_length >::operator[] ( index_t  i  )  const [inline]

Gets the i'th element of this vector.

Reimplemented from GenVector< double >.

Definition at line 1099 of file matrix.h.

template<int t_length>
double& SmallVector< t_length >::operator[] ( index_t  i  )  [inline]

Gets a mutable reference to the i'th element of this vector.

Reimplemented from GenVector< double >.

Definition at line 1104 of file matrix.h.

template<int t_length>
double SmallVector< t_length >::operator[] ( index_t  i  )  const [inline]

Gets the i'th element of this vector.

Reimplemented from GenVector< double >.

Definition at line 1099 of file matrix.h.

template<int t_length>
const double* SmallVector< t_length >::ptr (  )  const [inline]

A pointer to the C-style array containing the elements of this vector.

Reimplemented from GenVector< double >.

Definition at line 1095 of file matrix.h.

template<int t_length>
double* SmallVector< t_length >::ptr (  )  [inline]

A pointer to the C-style array containing the elements of this vector.

Reimplemented from GenVector< double >.

Definition at line 1091 of file matrix.h.

template<int t_length>
const double* SmallVector< t_length >::ptr (  )  const [inline]

A pointer to the C-style array containing the elements of this vector.

Reimplemented from GenVector< double >.

Definition at line 1095 of file matrix.h.

template<int t_length>
double* SmallVector< t_length >::ptr (  )  [inline]

A pointer to the C-style array containing the elements of this vector.

Reimplemented from GenVector< double >.

Definition at line 1091 of file matrix.h.


The documentation for this class was generated from the following files:
Generated on Mon Jan 24 12:04:40 2011 for FASTlib by  doxygen 1.6.3