CVector< T > Class Template Reference

Class representing vector. More...

#include <matrix.h>

List of all members.

Public Member Functions

 CVector (int s=0, T e=0)
 ~CVector ()
 CVector (const CVector &v)
CVectoroperator= (const CVector &v)
operator* (const CVector &v) const
 Scalar product of two vectors.
CVector operator* (T a) const
 Multiplication with scalar.
CVector operator+ (const CVector &v) const
CVector operator- (const CVector &v) const
T & operator[] (int i)
 Operator [] allows to change the coordinate of the vector.
operator() (int i) const
 Operator () returns value of an element.
 operator int () const
 Cast to int returns the size of the vector.
norm1 () const
 Norm computed as a sum of absolute values.
norm2 () const
 Euclidean norm.
CVector normalization () const
 Function returns normalization of the current vector with respect to Euclidean norm.
int write (const char *name, int precision)
CVector projection (const CVector &v) const
 Function returns orthonormal projection of the current vector onto v vector.

Private Attributes

T * elements
int size


Detailed Description

template<class T>
class CVector< T >

Class representing vector.

Constructor & Destructor Documentation

template<class T>
CVector< T >::CVector ( int  s = 0,
e = 0 
) [inline]

template<class T>
CVector< T >::~CVector (  )  [inline]

template<class T>
CVector< T >::CVector ( const CVector< T > &  v  )  [inline]


Member Function Documentation

template<class T>
CVector< T > & CVector< T >::operator= ( const CVector< T > &  v  )  [inline]

template<class T>
T CVector< T >::operator* ( const CVector< T > &  v  )  const [inline]

Scalar product of two vectors.

template<class T>
CVector< T > CVector< T >::operator* ( a  )  const [inline]

Multiplication with scalar.

template<class T>
CVector< T > CVector< T >::operator+ ( const CVector< T > &  v  )  const [inline]

template<class T>
CVector< T > CVector< T >::operator- ( const CVector< T > &  v  )  const [inline]

template<class T>
T& CVector< T >::operator[] ( int  i  )  [inline]

Operator [] allows to change the coordinate of the vector.

It returns reference to an element. No indices checking implemented.

template<class T>
T CVector< T >::operator() ( int  i  )  const [inline]

Operator () returns value of an element.

It is a const operator. It does not change the elements of the vector. No indices checking implemented.

template<class T>
CVector< T >::operator int (  )  const [inline]

Cast to int returns the size of the vector.

template<class T>
T CVector< T >::norm1 (  )  const [inline]

Norm computed as a sum of absolute values.

template<class T>
T CVector< T >::norm2 (  )  const [inline]

Euclidean norm.

template<class T>
CVector< T > CVector< T >::normalization (  )  const [inline]

Function returns normalization of the current vector with respect to Euclidean norm.

template<class T>
int CVector< T >::write ( const char *  name,
int  precision 
) [inline]

template<class T>
CVector< T > CVector< T >::projection ( const CVector< T > &  v  )  const [inline]

Function returns orthonormal projection of the current vector onto v vector.


Member Data Documentation

template<class T>
T* CVector< T >::elements [private]

template<class T>
int CVector< T >::size [private]


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

Generated on Sat May 24 19:47:31 2008 for Semi-hyperbolicity by  doxygen 1.5.5