Public Types | Public Member Functions
GenericVector< T > Class Template Reference

#include <vector.hpp>

Inheritance diagram for GenericVector< T >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef Eigen::Matrix< T,
Eigen::Dynamic, 1 > 
Base

Public Member Functions

GenericVectorappend (const GenericVector &_arg)
template<typename OtherDerived >
 GenericVector (const Eigen::MatrixBase< OtherDerived > &other)
template<typename OtherDerived >
 GenericVector (const Eigen::ReturnByValue< OtherDerived > &other)
template<typename OtherDerived >
 GenericVector (const Eigen::EigenBase< OtherDerived > &other)
GenericVector getAbsolute () const
unsigned getDim () const
T getMax () const
T getMean () const
T getMin () const
T getNorm (VectorNorm _norm) const
T getNorm (VectorNorm _norm, const GenericVector &_scale) const
void init (unsigned _dim=0)
bool isEmpty () const
bool operator!= (const GenericVector &_arg) const
bool operator< (const GenericVector &_arg) const
bool operator<= (const GenericVector &_arg) const
bool operator== (const GenericVector &_arg) const
bool operator> (const GenericVector &_arg) const
bool operator>= (const GenericVector &_arg) const
virtual returnValue print (std::ostream &stream=std::cout, const std::string &name=DEFAULT_LABEL, const std::string &startString=DEFAULT_START_STRING, const std::string &endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const std::string &colSeparator=DEFAULT_COL_SEPARATOR, const std::string &rowSeparator=DEFAULT_ROW_SEPARATOR) const
virtual returnValue print (const std::string &filename, const std::string &name=DEFAULT_LABEL, const std::string &startString=DEFAULT_START_STRING, const std::string &endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const std::string &colSeparator=DEFAULT_COL_SEPARATOR, const std::string &rowSeparator=DEFAULT_ROW_SEPARATOR) const
virtual returnValue print (std::ostream &stream, const std::string &name, PrintScheme printScheme) const
virtual returnValue print (const std::string &filename, const std::string &name, PrintScheme printScheme) const
virtual returnValue read (std::istream &stream)
virtual returnValue read (const std::string &filename)
void setAll (const T &_value)
GenericVectorsetUnitVector (unsigned _idx)
virtual ~GenericVector ()
Constructors.
 GenericVector ()
 GenericVector (unsigned _dim)
 GenericVector (unsigned _dim, const T *const _values)
 GenericVector (std::vector< T > _values)

Detailed Description

template<typename T>
class GenericVector< T >

A generic vector class based on Eigen's matrix class.

Definition at line 53 of file vector.hpp.


Member Typedef Documentation

template<typename T>
typedef Eigen::Matrix<T, Eigen::Dynamic, 1> GenericVector< T >::Base

Handy typedef for the base vector class.

Reimplemented from Eigen::Matrix< T, Eigen::Dynamic, 1 >.

Definition at line 63 of file vector.hpp.


Constructor & Destructor Documentation

template<typename T>
template<typename OtherDerived >
GenericVector< T >::GenericVector ( const Eigen::MatrixBase< OtherDerived > &  other) [inline]

Constructor from any other Eigen::MatrixBase derived class.

Definition at line 67 of file vector.hpp.

template<typename T>
template<typename OtherDerived >
GenericVector< T >::GenericVector ( const Eigen::ReturnByValue< OtherDerived > &  other) [inline]

Constructor from any other Eigen::ReturnByValue derived class.

Definition at line 71 of file vector.hpp.

template<typename T>
template<typename OtherDerived >
GenericVector< T >::GenericVector ( const Eigen::EigenBase< OtherDerived > &  other) [inline]

Constructor from any other Eigen::EigenBase derived class.

Definition at line 75 of file vector.hpp.

template<typename T>
GenericVector< T >::GenericVector ( ) [inline]

Default ctor

Definition at line 85 of file vector.hpp.

template<typename T>
GenericVector< T >::GenericVector ( unsigned  _dim) [inline]

Ctor which accepts size of the vector.

Definition at line 88 of file vector.hpp.

template<typename T>
GenericVector< T >::GenericVector ( unsigned  _dim,
const T *const  _values 
) [inline]

Ctor with an initializing C-like array.

Definition at line 91 of file vector.hpp.

template<typename T>
GenericVector< T >::GenericVector ( std::vector< T _values) [inline]

Ctor with an STL vector.

Definition at line 98 of file vector.hpp.

template<typename T>
virtual GenericVector< T >::~GenericVector ( ) [inline, virtual]

Destructor.

Definition at line 106 of file vector.hpp.


Member Function Documentation

template<typename T >
BEGIN_NAMESPACE_ACADO GenericVector< T > & GenericVector< T >::append ( const GenericVector< T > &  _arg)

Append elements to the vector.

Definition at line 42 of file vector.cpp.

template<typename T>
GenericVector GenericVector< T >::getAbsolute ( ) const [inline]

Return a new vector with absolute elements.

Definition at line 191 of file vector.hpp.

template<typename T>
unsigned GenericVector< T >::getDim ( ) const [inline]

Returns dimension of vector space.

Definition at line 171 of file vector.hpp.

template<typename T>
T GenericVector< T >::getMax ( ) const [inline]

Returns maximum element.

Definition at line 179 of file vector.hpp.

template<typename T>
T GenericVector< T >::getMean ( ) const [inline]

Returns mean value of all elements.

Definition at line 187 of file vector.hpp.

template<typename T>
T GenericVector< T >::getMin ( ) const [inline]

Returns minimum element.

Definition at line 183 of file vector.hpp.

template<typename T >
T GenericVector< T >::getNorm ( VectorNorm  _norm) const

Returns specified norm interpreted as a vector.

Parameters:
normthe type of norm to be computed.

Definition at line 67 of file vector.cpp.

template<typename T >
T GenericVector< T >::getNorm ( VectorNorm  _norm,
const GenericVector< T > &  _scale 
) const

Returns specified norm interpreted as a vector (with scaling).

Parameters:
normthe type of norm to be computed.
scalethe element-wise scale.

Definition at line 75 of file vector.cpp.

template<typename T>
void GenericVector< T >::init ( unsigned  _dim = 0) [inline]

Initialization routine.

Definition at line 154 of file vector.hpp.

template<typename T>
bool GenericVector< T >::isEmpty ( ) const [inline]

Returns whether the vector is empty.

Definition at line 175 of file vector.hpp.

template<typename T>
bool GenericVector< T >::operator!= ( const GenericVector< T > &  _arg) const [inline]

Inequality operator.

Definition at line 118 of file vector.hpp.

template<typename T>
bool GenericVector< T >::operator< ( const GenericVector< T > &  _arg) const [inline]

Definition at line 148 of file vector.hpp.

template<typename T>
bool GenericVector< T >::operator<= ( const GenericVector< T > &  _arg) const [inline]

Definition at line 123 of file vector.hpp.

template<typename T>
bool GenericVector< T >::operator== ( const GenericVector< T > &  _arg) const [inline]

Equality operator.

Definition at line 110 of file vector.hpp.

template<typename T>
bool GenericVector< T >::operator> ( const GenericVector< T > &  _arg) const [inline]

Definition at line 143 of file vector.hpp.

template<typename T>
bool GenericVector< T >::operator>= ( const GenericVector< T > &  _arg) const [inline]

Definition at line 133 of file vector.hpp.

template<typename T >
returnValue GenericVector< T >::print ( std::ostream &  stream = std::cout,
const std::string &  name = DEFAULT_LABEL,
const std::string &  startString = DEFAULT_START_STRING,
const std::string &  endString = DEFAULT_END_STRING,
uint  width = DEFAULT_WIDTH,
uint  precision = DEFAULT_PRECISION,
const std::string &  colSeparator = DEFAULT_COL_SEPARATOR,
const std::string &  rowSeparator = DEFAULT_ROW_SEPARATOR 
) const [virtual]

Prints object to given file. Various settings can be specified defining its output format.

Parameters:
[in]streamOutput stream for printing.
[in]nameName label to be printed before the numerical values.
[in]startStringPrefix before printing the numerical values.
[in]endStringSuffix after printing the numerical values.
[in]widthTotal number of digits per single numerical value.
[in]precisionNumber of decimals per single numerical value.
[in]colSeparatorSeparator between the columns of the numerical values.
[in]rowSeparatorSeparator between the rows of the numerical values.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 97 of file vector.cpp.

template<typename T >
returnValue GenericVector< T >::print ( const std::string &  filename,
const std::string &  name = DEFAULT_LABEL,
const std::string &  startString = DEFAULT_START_STRING,
const std::string &  endString = DEFAULT_END_STRING,
uint  width = DEFAULT_WIDTH,
uint  precision = DEFAULT_PRECISION,
const std::string &  colSeparator = DEFAULT_COL_SEPARATOR,
const std::string &  rowSeparator = DEFAULT_ROW_SEPARATOR 
) const [virtual]

Prints object to file with given name. Various settings can be specified defining its output format.

Parameters:
[in]filenameFilename for printing.
[in]nameName label to be printed before the numerical values.
[in]startStringPrefix before printing the numerical values.
[in]endStringSuffix after printing the numerical values.
[in]widthTotal number of digits per single numerical value.
[in]precisionNumber of decimals per single numerical value.
[in]colSeparatorSeparator between the columns of the numerical values.
[in]rowSeparatorSeparator between the rows of the numerical values.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 161 of file vector.cpp.

template<typename T >
returnValue GenericVector< T >::print ( std::ostream &  stream,
const std::string &  name,
PrintScheme  printScheme 
) const [virtual]

Prints object to given file. Various settings can be specified defining its output format.

Parameters:
[in]streamOutput stream for printing.
[in]nameName label to be printed before the numerical values.
[in]printSchemePrint scheme defining the output format of the information.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 185 of file vector.cpp.

template<typename T >
returnValue GenericVector< T >::print ( const std::string &  filename,
const std::string &  name,
PrintScheme  printScheme 
) const [virtual]

Prints object to given file. Various settings can be specified defining its output format.

Parameters:
[in]filenameFilename for printing.
[in]nameName label to be printed before the numerical values.
[in]printSchemePrint scheme defining the output format of the information.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 232 of file vector.cpp.

template<typename T >
returnValue GenericVector< T >::read ( std::istream &  stream) [virtual]

Read data from an input file.

Definition at line 251 of file vector.cpp.

template<typename T >
returnValue GenericVector< T >::read ( const std::string &  filename) [virtual]

Read data from an input file.

Definition at line 262 of file vector.cpp.

template<typename T>
void GenericVector< T >::setAll ( const T _value) [inline]

Set all elements constant.

Definition at line 159 of file vector.hpp.

template<typename T >
GenericVector< T > & GenericVector< T >::setUnitVector ( unsigned  _idx)

Sets vector to the _idx-th unit vector.

Definition at line 55 of file vector.cpp.


The documentation for this class was generated from the following files:


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:39