SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::component::linearsolver::EigenVector< InDataTypes > Class Template Reference

#include <EigenVector.h>

Inheritance diagram for sofa::component::linearsolver::EigenVector< InDataTypes >:

Detailed Description

template<class InDataTypes>
class sofa::component::linearsolver::EigenVector< InDataTypes >

Container of a vector of the Eigen library. Not an eigenvector of a matrix.

Protected Attributes

VectorEigen eigenVector
 the data More...
 

Public Member Functions

VectorEigengetVectorEigen ()
 
const VectorEigengetVectorEigen () const
 
 EigenVector (Index nbRow=0)
 
Index size () const override
 Number of elements. More...
 
void resize (Index nbRow) override
 Resize the matrix without preserving the data (the matrix is set to zero) More...
 
void resizeBlocks (Index nbBlocks)
 Resize the matrix without preserving the data (the matrix is set to zero), with the size given in number of blocks. More...
 
SReal element (Index i) const override
 Read the value of element i. More...
 
void set (Index i, double v) override
 
void setBlock (Index i, const Block &v)
 
void add (Index i, double v) override
 
void clear (Index i) override
 Reset the value of element i to 0. More...
 
void clear () override
 Set all values to 0, by resizing to the same size. More...
 
template<>
const char * Name ()
 
template<>
const char * Name ()
 
- Public Member Functions inherited from sofa::defaulttype::BaseVector
virtual ~BaseVector ()
 
virtual void set (Index i, SReal v)=0
 Write the value of element i. More...
 
virtual void add (Index i, SReal v)=0
 Add v to the existing value of element i. More...
 
virtual const floatelements (Index i0, Index n, float *src) const
 Get the values of n elements, starting at element i0, into given float buffer, or return the pointer to the data if the in-memory format is compatible. More...
 
virtual const doubleelements (Index i0, Index n, double *src) const
 Get the values of n elements, starting at element i0, into given double buffer, or return the pointer to the data if the in-memory format is compatible. More...
 
virtual const intelements (Index i0, Index n, int *src) const
 Get the values of n elements, starting at element i0, into given int buffer, or return the pointer to the data if the in-memory format is compatible. More...
 
virtual void set (Index i0, Index n, const float *src)
 Write the values of n float elements, starting at element i0. More...
 
virtual void set (Index i0, Index n, const double *src)
 Write the values of n double elements, starting at element i0. More...
 
virtual void set (Index i0, Index n, const int *src)
 Write the values of n int elements, starting at element i0. More...
 
virtual void add (Index i0, Index n, const float *src)
 Add to the values of n float elements, starting at element i0. More...
 
virtual void add (Index i0, Index n, const double *src)
 Add to the values of n double elements, starting at element i0. More...
 
virtual void add (Index i0, Index n, const int *src)
 Add to the values of n int elements, starting at element i0. More...
 
virtual ElementType getElementType () const
 
virtual std::size_t getElementSize () const
 
virtual bool isFull () const
 Return true if this vector is full, i.a. all elements are stored in memory. More...
 
bool isSparse () const
 

Static Public Member Functions

static const char * Name ()
 

Friends

std::ostream & operator<< (std::ostream &out, const EigenVector< InDataTypes > &v)
 

Additional Inherited Members

- Protected Member Functions inherited from sofa::defaulttype::BaseVector
template<class T >
const T * elementsDefaultImpl (Index i0, Index n, T *buffer) const
 
template<class T >
void setDefaultImpl (Index i0, Index n, const T *src)
 
template<class T >
void addDefaultImpl (Index i0, Index n, const T *src)
 

Attribute details

template<class InDataTypes >
VectorEigen sofa::component::linearsolver::EigenVector< InDataTypes >::eigenVector
protected

the data

Constructor details

template<class InDataTypes >
sofa::component::linearsolver::EigenVector< InDataTypes >::EigenVector ( Index  nbRow = 0)
inline

Function details

template<class InDataTypes >
void sofa::component::linearsolver::EigenVector< InDataTypes >::add ( Index  i,
double  v 
)
inlineoverride
template<class InDataTypes >
void sofa::component::linearsolver::EigenVector< InDataTypes >::clear ( Index  i)
inlineoverridevirtual

Reset the value of element i to 0.

Reimplemented from sofa::defaulttype::BaseVector.

template<class InDataTypes >
void sofa::component::linearsolver::EigenVector< InDataTypes >::clear ( )
inlineoverridevirtual

Set all values to 0, by resizing to the same size.

Implements sofa::defaulttype::BaseVector.

template<class InDataTypes >
SReal sofa::component::linearsolver::EigenVector< InDataTypes >::element ( Index  i) const
inlineoverridevirtual

Read the value of element i.

Implements sofa::defaulttype::BaseVector.

template<class InDataTypes >
VectorEigen& sofa::component::linearsolver::EigenVector< InDataTypes >::getVectorEigen ( )
inline
template<class InDataTypes >
const VectorEigen& sofa::component::linearsolver::EigenVector< InDataTypes >::getVectorEigen ( ) const
inline
template<class InDataTypes >
static const char* sofa::component::linearsolver::EigenVector< InDataTypes >::Name ( )
static
template<class InDataTypes >
void sofa::component::linearsolver::EigenVector< InDataTypes >::resize ( Index  nbRow)
inlineoverridevirtual

Resize the matrix without preserving the data (the matrix is set to zero)

Implements sofa::defaulttype::BaseVector.

template<class InDataTypes >
void sofa::component::linearsolver::EigenVector< InDataTypes >::resizeBlocks ( Index  nbBlocks)
inline

Resize the matrix without preserving the data (the matrix is set to zero), with the size given in number of blocks.

template<class InDataTypes >
void sofa::component::linearsolver::EigenVector< InDataTypes >::set ( Index  i,
double  v 
)
inlineoverride
template<class InDataTypes >
void sofa::component::linearsolver::EigenVector< InDataTypes >::setBlock ( Index  i,
const Block v 
)
inline
template<class InDataTypes >
Index sofa::component::linearsolver::EigenVector< InDataTypes >::size ( ) const
inlineoverridevirtual

Number of elements.

Implements sofa::defaulttype::BaseVector.

Enum details

template<class InDataTypes >
anonymous enum
Enumerator
Nin 

Related details

template<class InDataTypes >
std::ostream& operator<< ( std::ostream &  out,
const EigenVector< InDataTypes > &  v 
)
friend