sofa::component::linearsolver::NewMatVector Class Reference

#include <NewMatVector.h>

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

Inheritance graph
[legend]
Collaboration diagram for sofa::component::linearsolver::NewMatVector:

Collaboration graph
[legend]

Public Types

typedef NEWMAT::ColumnVector SubVector

Public Member Functions

 NewMatVector ()
virtual ~NewMatVector ()
virtual void resize (int dim)
 Resize the vector, and reset all values to 0.
virtual SReal element (int i) const
 Read the value of element i.
void set (int i, SReal v)
 Write the value of element i.
void add (int i, SReal v)
 Add v to the existing value of element i.
SReal & operator[] (int i)
SReal operator[] (int i) const
int size () const
 Number of elements.
NEWMAT::GetSubMatrix sub (int i, int n)
template<class T >
void getsub (int i, int n, T &v)
template<class T >
void setsub (int i, int n, const T &v)
void clear ()
 v = 0
void eq (const NewMatVector &a)
 v = a
void peq (const NewMatVector &a, double f=1.0)
 v += a*f
void teq (double f)
 v *= f
double dot (const NewMatVector &a) const
double norm () const
template<class T >
void operator= (const T &m)

Friends

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

Detailed Description

Definition at line 42 of file NewMatVector.h.


Member Typedef Documentation

Definition at line 46 of file NewMatVector.h.


Constructor & Destructor Documentation

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

Definition at line 48 of file NewMatVector.h.

virtual sofa::component::linearsolver::NewMatVector::~NewMatVector (  )  [inline, virtual]

Definition at line 52 of file NewMatVector.h.


Member Function Documentation

void sofa::component::linearsolver::NewMatVector::add ( int  i,
SReal  v 
) [inline, virtual]

Add v to the existing value of element i.

Implements sofa::defaulttype::BaseVector.

Definition at line 72 of file NewMatVector.h.

References element().

void sofa::component::linearsolver::NewMatVector::clear (  )  [inline, virtual]

v = 0

Implements sofa::defaulttype::BaseVector.

Definition at line 110 of file NewMatVector.h.

double sofa::component::linearsolver::NewMatVector::dot ( const NewMatVector &  a  )  const [inline]

Returns:
v.a

Definition at line 132 of file NewMatVector.h.

virtual SReal sofa::component::linearsolver::NewMatVector::element ( int  i  )  const [inline, virtual]

Read the value of element i.

Implements sofa::defaulttype::BaseVector.

Definition at line 62 of file NewMatVector.h.

Referenced by add(), operator[](), and set().

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

v = a

Definition at line 116 of file NewMatVector.h.

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

Definition at line 98 of file NewMatVector.h.

double sofa::component::linearsolver::NewMatVector::norm (  )  const [inline]

Returns:
sqrt(v.v)

Definition at line 138 of file NewMatVector.h.

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

Definition at line 146 of file NewMatVector.h.

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

Definition at line 82 of file NewMatVector.h.

References element().

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

Definition at line 77 of file NewMatVector.h.

References element().

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

v += a*f

Definition at line 122 of file NewMatVector.h.

virtual void sofa::component::linearsolver::NewMatVector::resize ( int  dim  )  [inline, virtual]

Resize the vector, and reset all values to 0.

Implements sofa::defaulttype::BaseVector.

Definition at line 56 of file NewMatVector.h.

void sofa::component::linearsolver::NewMatVector::set ( int  i,
SReal  v 
) [inline, virtual]

Write the value of element i.

Implements sofa::defaulttype::BaseVector.

Definition at line 67 of file NewMatVector.h.

References element().

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

Definition at line 104 of file NewMatVector.h.

int sofa::component::linearsolver::NewMatVector::size (  )  const [inline, virtual]

Number of elements.

Implements sofa::defaulttype::BaseVector.

Definition at line 87 of file NewMatVector.h.

NEWMAT::GetSubMatrix sofa::component::linearsolver::NewMatVector::sub ( int  i,
int  n 
) [inline]

Definition at line 92 of file NewMatVector.h.

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

v *= f

Definition at line 127 of file NewMatVector.h.


Friends And Related Function Documentation

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

Definition at line 148 of file NewMatVector.h.


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

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