Vector class that include the boost::ublas::vector. More...
#include <jrl/mal/boostvector.hh>
Public Member Functions | |
Constructors | |
Vector (const InternalVector::size_type size=0) | |
Classical constructor. | |
Vector (InternalVector *clone, const bool proprio=false) | |
Build only the capsule around a already existing boost vector object. | |
Vector (const Vector ©) | |
Build a new internal vector from existing boost vector object by copying the data. | |
virtual | ~Vector (void) |
InternalVector & | accessToMotherLib (void) |
Access to the boost internal vector. | |
const InternalVector & | accessToMotherLib (void) const |
Access to the boost internal vector. | |
Vector & | initFromMotherLib (const InternalVector &bv) |
Copy the values and data of an existing boost vector. | |
Modifiors | |
unsigned int | size (void) const |
Vector & | resize (const InternalVector::size_type nbRows, const bool setZero=true) |
Vector & | fill (const FloatType value) |
Vector & | setZero (void) |
Vector & | opposite (Vector &res) const |
Vector | opposite (void) const |
Accessors | |
Access to an element, a block of element or the hidden double-array matrix. | |
const FloatType * | datablock (void) const |
Access to the C-style double matrix. | |
FloatType * | datablock (void) |
Access to the C-style double matrix. | |
const FloatType & | elementAt (const InternalVector::size_type row) const |
Access to the i-th element in R-only. | |
FloatType & | elementAt (const InternalVector::size_type row) |
Access to the i-th element in RW-mode. | |
Vector & | extract (const InternalVector::size_type top, const InternalVector::size_type nbrows, Vector &C) const |
Extract a part of the vector. | |
Vector | extract (const InternalVector::size_type top, const InternalVector::size_type nbrows) const |
Extract a part of the vector. | |
Protected Attributes | |
InternalVector | staticVector |
InternalVector * | dynamicVector |
InternalVector & | vector |
bool | proprio |
Static Protected Attributes | |
static const bool | AUTORESIZE = true |
static const bool | CHECKRESIZE = true |
Operators | |
Classical operators: use v1 + v2 for addition, v1(i) for i-th element... | |
class | Matrix |
Vector | operator+ (const Vector &v1, const Vector &v2) |
Vector | operator- (const Vector &v1, const Vector &v2) |
Vector | operator* (const Vector &v1, const Vector &v2) |
Vector | operator* (const Vector &v1, const FloatType x) |
Vector | operator* (const FloatType x, const Vector &v1) |
Vector | operator- (const Vector &v1) |
std::istream & | operator>> (std::istream &is, Vector &v1) |
std::ostream & | operator<< (std::ostream &os, const Vector &v1) |
Vector & | operator+= (const Vector &v1) |
Vector & | operator-= (const Vector &v1) |
Vector & | operator*= (const Vector &v1) |
Vector & | operator*= (const FloatType x) |
const FloatType & | operator() (const InternalVector::size_type i) const |
FloatType & | operator() (const InternalVector::size_type i) |
Vector & | operator= (const Vector &v1) |
Scalar Operator E->R | |
FloatType | norm (void) const |
FloatType | norm1 (void) const |
Norm 1 sum( |xi| ) | |
FloatType | max (void) const |
Not implemented yet. | |
FloatType | min (void) const |
Not implemented yet. | |
FloatType | sumSquare (void) const |
Not implemented yet. | |
FloatType | normInfty (void) const |
Infinity norm: max( |xi| ). | |
FloatType | scalarProduct (const Vector &v2) const |
Scalar product: v1.v2 = sum( x1*x2 ). | |
static FloatType | scalarProduct (const Vector &v1, const Vector &v2) |
Scalar product: v1.v2 = sum( x1*x2 ). | |
Operator Functions ExE->E | |
Each C-style function is implemented as a C++ operator. | |
Vector & | crossProduct (const Vector &v2, Vector &res) const |
Vector | crossProduct (const Vector &v2) |
Vector | multiply (const Vector &v2) const |
Vector & | multiply (const Vector &v2, Vector &res) const |
Vector | multiply (const FloatType x) const |
Vector & | multiply (const FloatType x, Vector &res) const |
Vector | addition (const Vector &v2) const |
Vector & | addition (const Vector &v2, Vector &res) const |
Vector | substraction (const Vector &v2) const |
Vector & | substraction (const Vector &v2, Vector &res) const |
static Vector & | crossProduct (const Vector &v1, const Vector &v2, Vector &res) |
static Vector & | multiply (const Vector &v1, const Vector &v2, Vector &res) |
static Vector & | multiply (const Vector &v1, const FloatType x, Vector &res) |
static Vector & | addition (const Vector &v1, const Vector &v2, Vector &res) |
static Vector & | substraction (const Vector &v1, const Vector &v2, Vector &res) |
Internal functions (autoresize) | |
bool | autoresize (void) |
static void | _resize (InternalVector &vct1, const InternalVector &vct2) |
static bool | _checksize (const InternalVector &vct1, const InternalVector &vct2) |
static bool | _checksizeVerb (const InternalVector &vct1, const InternalVector &vct2) |
static bool | _checksize (const InternalVector &vct1, const InternalVector::size_type s2) |
static bool | _checksizeVerb (const InternalVector &vct1, const InternalVector::size_type s2) |
Vector class that include the boost::ublas::vector.
The class simply encapsulates the ublas::vector object, and implement a set of standard functions. When the maal::boost::Vector object is constructed, it automatically builds the internal ublas::vector object. The internal object can be access through accessToMotherLib. Finally, it is possible to build the capsule around an existing boost ublas::vector through the appropriate constructor.
|
inline |
Classical constructor.
Build the internal vector from the demanded size.
References dynamicVector, size(), staticVector, and vector.
Referenced by addition(), addition(), addition(), crossProduct(), crossProduct(), crossProduct(), extract(), extract(), fill(), initFromMotherLib(), multiply(), multiply(), multiply(), multiply(), multiply(), multiply(), operator*, operator*, operator*, operator*=(), operator*=(), operator+, operator+=(), operator-, operator-, operator-=(), operator<<, operator=(), operator>>, opposite(), opposite(), resize(), scalarProduct(), scalarProduct(), setZero(), substraction(), substraction(), substraction(), and Vector().
|
inline |
Build only the capsule around a already existing boost vector object.
References dynamicVector, proprio, staticVector, and vector.
|
inline |
Build a new internal vector from existing boost vector object by copying the data.
References dynamicVector, proprio, staticVector, Vector(), and vector.
|
inlinevirtual |
References dynamicVector, and proprio.
|
inlinestaticprotected |
References CHECKRESIZE.
Referenced by addition(), crossProduct(), elementAt(), elementAt(), extract(), multiply(), and substraction().
|
inlinestaticprotected |
References CHECKRESIZE.
|
inlinestaticprotected |
References CHECKRESIZE.
|
inlinestaticprotected |
References CHECKRESIZE.
|
inlinestaticprotected |
References AUTORESIZE.
Referenced by crossProduct(), and multiply().
|
inline |
Access to the boost internal vector.
References vector.
|
inline |
Access to the boost internal vector.
References vector.
|
inlinestatic |
References addition(), and Vector().
Referenced by addition(), addition(), operator+, and operator+=().
References addition(), size(), and Vector().
References _checksize(), MAAL_CHECKVERBOSE, Vector(), and vector.
|
inline |
References AUTORESIZE.
|
inlinestatic |
References crossProduct(), and Vector().
Referenced by crossProduct(), and crossProduct().
References crossProduct(), size(), and Vector().
References _checksize(), _resize(), MAAL_CHECKVERBOSE, Vector(), and vector.
|
inline |
|
inline |
|
inline |
Access to the i-th element in RW-mode.
This C-style function is equivalent to the C++ operator().
References _checksize(), MAAL_CHECKVERBOSE, and vector.
|
inline |
Access to the i-th element in R-only.
This C-style function is equivalent to the C++ operator().
References _checksize(), MAAL_CHECKVERBOSE, and vector.
Referenced by operator()().
|
inline |
|
inline |
Extract a part of the vector.
Not implemented yet.
References _checksize(), MAAL_CHECKVERBOSE, Vector(), and vector.
Referenced by extract().
|
inline |
|
inline |
Not implemented yet.
References ML_NOT_IMPLEMENTED.
|
inline |
Not implemented yet.
References ML_NOT_IMPLEMENTED.
References multiply(), size(), and Vector().
|
inlinestatic |
References multiply(), and Vector().
|
inlinestatic |
References multiply(), and Vector().
Referenced by multiply(), multiply(), multiply(), multiply(), operator*, operator*, operator*, operator*=(), and operator*=().
References multiply(), size(), and Vector().
References _checksize(), _resize(), MAAL_CHECKVERBOSE, size(), Vector(), and vector.
|
inline |
Infinity norm: max( |xi| ).
References vector.
|
inline |
References elementAt().
|
inline |
References vector.
References multiply(), and Vector().
References multiply(), and Vector().
References addition(), and Vector().
References substraction(), and Vector().
|
inline |
References opposite(), size(), and Vector().
Referenced by opposite().
|
inline |
References setZero(), Vector(), and vector.
Referenced by maal::boost::Matrix::getDiagonal().
|
inline |
|
inline |
References vector.
Referenced by addition(), crossProduct(), fill(), multiply(), multiply(), multiply(), opposite(), maal::boost::Matrix::setDiagonal(), substraction(), and Vector().
|
inlinestatic |
References substraction(), and Vector().
Referenced by operator-, operator-=(), substraction(), and substraction().
References size(), substraction(), and Vector().
References _checksize(), MAAL_CHECKVERBOSE, Vector(), and vector.
|
inline |
Not implemented yet.
References ML_NOT_IMPLEMENTED.
References multiply(), and Vector().
References multiply(), and Vector().
References multiply(), and Vector().
References addition(), and Vector().
References opposite(), and Vector().
References substraction(), and Vector().
|
friend |
|
friend |
|
staticprotected |
Referenced by _resize(), and autoresize().
|
staticprotected |
Referenced by _checksize(), _checksize(), _checksizeVerb(), and _checksizeVerb().
|
protected |
|
protected |
|
protected |
Referenced by accessToMotherLib(), accessToMotherLib(), addition(), crossProduct(), datablock(), datablock(), elementAt(), elementAt(), extract(), fill(), initFromMotherLib(), maal::boost::Matrix::multiply(), multiply(), multiply(), norm(), norm1(), normInfty(), operator()(), operator<<, operator=(), operator>>, opposite(), resize(), scalarProduct(), scalarProduct(), setZero(), size(), substraction(), Vector(), Vector(), and Vector().