Vector Class Reference

#include <matrix_old.h>

Inherited by EpetraVector.

List of all members.

Public Member Functions

virtual ~Vector ()
virtual void alloc (int ndofs)=0
 allocate memory for storing ndofs elements
virtual void free ()=0
 free the memory
virtual void finish ()
virtual scalar get (int idx)=0
 Get the value from a position.
virtual void extract (scalar *v) const =0
 Extract vector values into user-provided array.
virtual void zero ()=0
 Zero the vector.
virtual void set (int idx, scalar y)=0
 set the entry on a specified position
virtual void add (int idx, scalar y)=0
 update element on the specified position
virtual void add (int n, int *idx, scalar *y)=0
 update subset of the elements
virtual bool dump (FILE *file, const char *var_name, EMatrixDumpFormat=DF_MATLAB_SPARSE)=0

Protected Attributes

int size

Constructor & Destructor Documentation

virtual Vector::~Vector (  )  [inline, virtual]

Member Function Documentation

virtual void Vector::add ( int  n,
int *  idx,
scalar y 
) [pure virtual]

update subset of the elements

Parameters:
[in] n - number of positions to update
[in] idx - indices where to update
[in] y - values

Implemented in EpetraVector.

virtual void Vector::add ( int  idx,
scalar  y 
) [pure virtual]

update element on the specified position

Parameters:
[in] idx - indices where to update
[in] y - value

Implemented in EpetraVector.

virtual void Vector::alloc ( int  ndofs  )  [pure virtual]

allocate memory for storing ndofs elements

Parameters:
[in] ndofs - number of elements of the vector

Implemented in EpetraVector.

virtual bool Vector::dump ( FILE *  file,
const char *  var_name,
EMatrixDumpFormat  = DF_MATLAB_SPARSE 
) [pure virtual]

Implemented in EpetraVector.

virtual void Vector::extract ( scalar v  )  const [pure virtual]

Extract vector values into user-provided array.

Parameters:
[out] v - array which will contain extracted values

Implemented in EpetraVector.

virtual void Vector::finish (  )  [inline, virtual]
virtual void Vector::free (  )  [pure virtual]

free the memory

Implemented in EpetraVector.

virtual scalar Vector::get ( int  idx  )  [pure virtual]

Get the value from a position.

Returns:
the value form the specified index
Parameters:
[in] idx - index which to obtain the value from

Implemented in EpetraVector.

virtual void Vector::set ( int  idx,
scalar  y 
) [pure virtual]

set the entry on a specified position

Parameters:
[in] idx - indices where to update
[in] y - value

Implemented in EpetraVector.

virtual void Vector::zero (  )  [pure virtual]

Zero the vector.

Implemented in EpetraVector.


Member Data Documentation

int Vector::size [protected]

The documentation for this class was generated from the following file:
Generated on Sat Jun 5 15:17:43 2010 for Hermes2D Library: Real Version by  doxygen 1.6.3