#include <yat/utility/VectorBase.h>
Public Types | |
typedef double | value_type |
typedef const double & | const_reference |
typedef StrideIterator< const double * > | const_iterator |
VectorBase::const_iterator. | |
Public Member Functions | |
VectorBase (const gsl_vector *v=NULL) | |
Constructor. | |
virtual | ~VectorBase (void) |
const_iterator | begin (void) const |
const_iterator | end (void) const |
bool | equal (const VectorBase &, const double precision=0) const |
Check whether VectorBases are equal within a user defined precision, set by precision. | |
const gsl_vector * | gsl_vector_p (void) const |
virtual bool | isview (void) const =0 |
size_t | size (void) const |
const double & | operator() (size_t i) const |
Element access operator. | |
bool | operator== (const VectorBase &) const |
Comparison operator. Takes linear time. | |
bool | operator!= (const VectorBase &) const |
Comparison operator. Takes linear time. | |
double | operator* (const VectorBase &) const |
Protected Attributes | |
const gsl_vector * | const_vec_ |
pointer to underlying GSL vector |
This is an interface class for vectors containing the const interface. For mutable functionality see VectorMutable.
typedef double theplu::yat::utility::VectorBase::value_type |
typedef const double& theplu::yat::utility::VectorBase::const_reference |
virtual theplu::yat::utility::VectorBase::~VectorBase | ( | void | ) | [virtual] |
The destructor.
const_iterator theplu::yat::utility::VectorBase::begin | ( | void | ) | const |
const_iterator theplu::yat::utility::VectorBase::end | ( | void | ) | const |
bool theplu::yat::utility::VectorBase::equal | ( | const VectorBase & | , | |
const double | precision = 0 | |||
) | const |
Check whether VectorBases are equal within a user defined precision, set by precision.
const gsl_vector* theplu::yat::utility::VectorBase::gsl_vector_p | ( | void | ) | const |
virtual bool theplu::yat::utility::VectorBase::isview | ( | void | ) | const [pure virtual] |
Check if the vector object is a view (sub-vector) to another vector.
Implemented in theplu::yat::utility::Vector, theplu::yat::utility::VectorConstView, theplu::yat::utility::VectorMutable, and theplu::yat::utility::VectorView.
size_t theplu::yat::utility::VectorBase::size | ( | void | ) | const |
const double& theplu::yat::utility::VectorBase::operator() | ( | size_t | i | ) | const |
Element access operator.
If | GSL range checks are enabled in the underlying GSL library a GSL_error exception is thrown if either index is out of range. |
bool theplu::yat::utility::VectorBase::operator== | ( | const VectorBase & | ) | const |
Comparison operator. Takes linear time.
Checks are performed with exact matching, i.e., rounding off effects may destroy comparison. Use the equal function for comparing elements within a user defined precision.
bool theplu::yat::utility::VectorBase::operator!= | ( | const VectorBase & | ) | const |
Comparison operator. Takes linear time.
Checks are performed with exact matching, i.e., rounding off effects may destroy comparison. Use the equal function for comparing elements within a user defined precision.
double theplu::yat::utility::VectorBase::operator* | ( | const VectorBase & | ) | const |