SOFA plugin: SofaNewmat  master
Open source framework for multi-physics simuation
sofa::component::linearsolver::NewMatVector Class Reference

#include <NewMatVector.h>

Inheritance diagram for sofa::component::linearsolver::NewMatVector:

Public Member Functions

 NewMatVector ()
 
 ~NewMatVector () override
 
void resize (Index dim) override
 
SReal element (Index i) const override
 
void set (Index i, SReal v) override
 
void add (Index i, SReal v) override
 
SReal & operator[] (Index i)
 
SReal operator[] (Index i) const
 
Index size () const override
 
NEWMAT::GetSubMatrix sub (Index i, Index n)
 
template<class T >
void getsub (Index i, Index n, T &v)
 
template<class T >
void setsub (Index i, Index n, const T &v)
 
void clear () override
 v = 0 More...
 
void eq (const NewMatVector &a)
 v = a More...
 
void eq (const NewMatVector &a, const NewMatVector &b, double f=1.0)
 v = a+b*f More...
 
void peq (const NewMatVector &a, double f=1.0)
 v += a*f More...
 
void teq (double f)
 v *= f More...
 
double dot (const NewMatVector &a) const
 
double norm () const
 
template<class T >
void operator= (const T &m)
 
- Public Member Functions inherited from sofa::linearalgebra::BaseVector
virtual ~BaseVector ()
 
virtual const float * elements (Index i0, Index n, float *src) const
 
virtual const double * elements (Index i0, Index n, double *src) const
 
virtual const int * elements (Index i0, Index n, int *src) const
 
virtual void set (Index i0, Index n, const float *src)
 
virtual void set (Index i0, Index n, const double *src)
 
virtual void set (Index i0, Index n, const int *src)
 
virtual void add (Index i0, Index n, const float *src)
 
virtual void add (Index i0, Index n, const double *src)
 
virtual void add (Index i0, Index n, const int *src)
 
virtual void clear (Index i)
 
virtual ElementType getElementType () const
 
virtual std::size_t getElementSize () const
 
virtual bool isFull () const
 
bool isSparse () const
 

Friends

std::ostream & operator<< (std::ostream &out, const NewMatVector &v)
 

Additional Inherited Members

- Public Attributes inherited from sofa::linearalgebra::BaseVector
 ELEMENT_UNKNOWN
 
 ELEMENT_FLOAT
 
 ELEMENT_INT
 
- Protected Member Functions inherited from sofa::linearalgebra::BaseVector
const T * elementsDefaultImpl (Index i0, Index n, T *buffer) const
 
void setDefaultImpl (Index i0, Index n, const T *src)
 
void addDefaultImpl (Index i0, Index n, const T *src)
 

Constructor details

◆ NewMatVector()

sofa::component::linearsolver::NewMatVector::NewMatVector ( )
inline

◆ ~NewMatVector()

sofa::component::linearsolver::NewMatVector::~NewMatVector ( )
inlineoverride

Function details

◆ add()

void sofa::component::linearsolver::NewMatVector::add ( Index  i,
SReal  v 
)
inlineoverridevirtual

◆ clear()

void sofa::component::linearsolver::NewMatVector::clear ( )
inlineoverridevirtual

◆ dot()

double sofa::component::linearsolver::NewMatVector::dot ( const NewMatVector a) const
inline
Returns
v.a

◆ element()

SReal sofa::component::linearsolver::NewMatVector::element ( Index  i) const
inlineoverridevirtual

◆ eq() [1/2]

void sofa::component::linearsolver::NewMatVector::eq ( const NewMatVector a)
inline

v = a

◆ eq() [2/2]

void sofa::component::linearsolver::NewMatVector::eq ( const NewMatVector a,
const NewMatVector b,
double  f = 1.0 
)
inline

v = a+b*f

◆ getsub()

template<class T >
void sofa::component::linearsolver::NewMatVector::getsub ( Index  i,
Index  n,
T &  v 
)
inline

◆ norm()

double sofa::component::linearsolver::NewMatVector::norm ( ) const
inline
Returns
sqrt(v.v)

◆ operator=()

template<class T >
void sofa::component::linearsolver::NewMatVector::operator= ( const T &  m)
inline

◆ operator[]() [1/2]

SReal& sofa::component::linearsolver::NewMatVector::operator[] ( Index  i)
inline

◆ operator[]() [2/2]

SReal sofa::component::linearsolver::NewMatVector::operator[] ( Index  i) const
inline

◆ peq()

void sofa::component::linearsolver::NewMatVector::peq ( const NewMatVector a,
double  f = 1.0 
)
inline

v += a*f

◆ resize()

void sofa::component::linearsolver::NewMatVector::resize ( Index  dim)
inlineoverridevirtual

◆ set()

void sofa::component::linearsolver::NewMatVector::set ( Index  i,
SReal  v 
)
inlineoverridevirtual

◆ setsub()

template<class T >
void sofa::component::linearsolver::NewMatVector::setsub ( Index  i,
Index  n,
const T &  v 
)
inline

◆ size()

Index sofa::component::linearsolver::NewMatVector::size ( void  ) const
inlineoverridevirtual

◆ sub()

NEWMAT::GetSubMatrix sofa::component::linearsolver::NewMatVector::sub ( Index  i,
Index  n 
)
inline

◆ teq()

void sofa::component::linearsolver::NewMatVector::teq ( double  f)
inline

v *= f

Related details

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const NewMatVector v 
)
friend