Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

MODEL::NumVector Class Template Reference

#include <numvector.h>

Inheritance diagram for MODEL::NumVector:

Inheritance graph
Collaboration diagram for MODEL::NumVector:

Collaboration graph
List of all members.

Public Types

typedef NT::number number
typedef NT::number numT
typedef NT::vect vect
typedef std::vector<number> base

Public Methods

 NumVector (const numT &init=0.)
virtual ~NumVector ()
 NumVector (const numT Tarray[])
NumVector* clone (void)
 NumVector (const NumVector &vcopy)
const NumVector& operator= (const NumVector &vassign)
const numT& operator[] (integer i) const
numT& operator[] (integer i)
NumVector& operator+= (const NumVector &nvplus)
NumVector& operator-= (const NumVector &nvmin)
NumVector& operator/= (const numT &nvdiv)
NumVector& operator *= (const numT &nvmul)


NumVector operator * (const numT &nvmul, const NumVector &nv)
NumVector operator/ (const NumVector &nvmul, const numT &nv)
NumVector operator+ (const NumVector &nvmul, const NumVector &nv)
NumVector operator- (const NumVector &nvmul, const NumVector &nv)
numT norm (const NumVector &nv)
numT length (const NumVector &nv)
NumVector operator- (const NumVector &m)

Detailed Description

template<integer dims, typename nelem = number, class NT = NumericTraits<nelem,dims>> class MODEL::NumVector

Class which adds functionality to Vector in case the type of data is numeric.

Definition at line 33 of file numvector.h.

Constructor & Destructor Documentation

NumVector ( const numT & init = 0. ) [inline]

Constuctor automatically resize for speed gain

Definition at line 42 of file numvector.h.

Referenced by clone().

NumVector ( const numT Tarray[] ) [inline]

Constructor to copy everything from an array resize has to be called, otherwise the objects[] do not exist !

Definition at line 49 of file numvector.h.

NumVector ( const NumVector<dims, nelem, NT> & vcopy ) [inline]

Copy constructor calls to class

Definition at line 57 of file numvector.h.

Member Function Documentation

NumVector * clone ( void ) [inline]

"virtual" copy constructor

Definition at line 54 of file numvector.h.

const NumVector & operator= ( const NumVector<dims, nelem, NT> & vassign ) [inline]

Assignment operator calls top class

Definition at line 60 of file numvector.h.

numT & operator[] ( integer i ) [inline]

Overloaded accessor to catch errors (bound checking)

Definition at line 74 of file numvector.h.

const numT & operator[] ( integer i ) const [inline]

Overloaded accessor to catch errors (bound checking)

Definition at line 64 of file numvector.h.

Friends And Related Function Documentation

numT length< dims, nelem, NT > ( const NumVector<dims, nelem, NT> & nv ) [friend]

Slightly more effort: the length.

numT norm< dims, nelem, NT > ( const NumVector<dims, nelem, NT> & nv ) [friend]

Computes the norm of a vector.

The documentation for this class was generated from the following file:
To get the sources or tarballs, please go to SourceForge or you can use the CVS repository.

More Info? Michael Peeters. Also, check our research website:

Last update: June 2002.

Looking for Open Source? Check out SourceForge Logo !