sofa::defaulttype::BaseVector Class Reference

Generic vector API, allowing to fill and use a vector independently of the linear algebra library in use. More...

#include <BaseVector.h>

Inheritance diagram for sofa::defaulttype::BaseVector:

Inheritance graph
[legend]

Public Member Functions

virtual ~BaseVector ()
virtual int size (void) const =0
 Number of elements.
virtual SReal element (int i) const =0
 Read the value of element i.
virtual void resize (int dim)=0
 Resize the vector, and reset all values to 0.
virtual void clear ()=0
 Reset all values to 0.
virtual void set (int i, SReal v)=0
 Write the value of element i.
virtual void add (int i, SReal v)=0
 Add v to the existing value of element i.
virtual void clear (int i)
 Reset the value of element i to 0.

Detailed Description

Generic vector API, allowing to fill and use a vector independently of the linear algebra library in use.

Note that accessing values using this class is rather slow and should only be used in codes where the provided genericity is necessary.

Definition at line 40 of file BaseVector.h.


Constructor & Destructor Documentation

virtual sofa::defaulttype::BaseVector::~BaseVector (  )  [inline, virtual]

Definition at line 43 of file BaseVector.h.


Member Function Documentation

virtual void sofa::defaulttype::BaseVector::add ( int  i,
SReal  v 
) [pure virtual]

virtual void sofa::defaulttype::BaseVector::clear ( int  i  )  [inline, virtual]

Reset the value of element i to 0.

Definition at line 66 of file BaseVector.h.

virtual void sofa::defaulttype::BaseVector::clear (  )  [pure virtual]

virtual SReal sofa::defaulttype::BaseVector::element ( int  i  )  const [pure virtual]

virtual void sofa::defaulttype::BaseVector::resize ( int  dim  )  [pure virtual]

virtual void sofa::defaulttype::BaseVector::set ( int  i,
SReal  v 
) [pure virtual]

virtual int sofa::defaulttype::BaseVector::size ( void   )  const [pure virtual]


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

Generated on Sun Nov 23 04:23:51 2008 for Sofa by  doxygen 1.5.7.1