GenLib2::Vector< T > Class Template Reference

Vector class. More...

#include <vector.h>

List of all members.

Public Member Functions

 Vector ()
 constructor matrix without size
 Vector (int n, const T &val=T(0))
 constructor initilize with value
 Vector (int n, const T *v)
 constructor, initialize with array
 Vector (const Vector &A)
 copy constructor
 ~Vector ()
 destructor
Vectoroperator= (const Vector &a)
Vectornewsize (int n)
 new size
Vectorclear ()
 set all elements to zero
Vectoroperator= (const T &v)
int dim () const
 vector size
int size () const
bool is_data () const
T & operator() (int i)
 set and get an matrix element without boundary check
const T & operator() (int i) const
void read (istream &is)
 read matrix
void print (ostream &os) const
 print matrix
Vectoroperator*= (T s)
Vectoroperator/= (T s)
 division by a scalar

Protected Member Functions

void allocate (int n)
 dot product
void free ()
 free memory
void copy (const T *v)
 copy array
void set (const T &val)
 set all elements to value

Protected Attributes

int _n
 vector dimension
T * _data
 vector elements


Detailed Description

template<class T>
class GenLib2::Vector< T >

Vector class.

General vector class.

Author:
Dirk Stallmann

Member Function Documentation

template<class T>
void GenLib2::Vector< T >::allocate ( int  n  )  [inline, protected]


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

Generated on Wed Aug 6 15:46:44 2008 by  doxygen 1.5.5