Vector Class Reference

one-dimensional array of double used for vector computations More...

#include <VecMat.h>

List of all members.

Public Member Functions

 Vector ()
 Constructor.
 Vector (unsigned int len, bool zero=false)
 Constructor.
 Vector (const Array< double > &other)
 Copy constructor (deep copy).
 Vector (const Vector &other)
 Copy constructor (deep copy).
 ~Vector ()
 Destructor.
void operator= (double value)
 set all entries to the same value
double norm () const
double norm2 () const
bool normalize ()
ArrayBase * clone () const
 Clone the vector (deep copy).
ArrayBase * cloneEmpty () const
 Clone the class of the vector.

Protected Member Functions

 Vector (Array< double > &other, bool reference)
 protected constructor for internal use
 Vector (unsigned int *d, double *e, unsigned int nd, unsigned int ne, bool reference)
 protected constructor for internal use
void resize_i (unsigned int *d, unsigned int nd, bool copy)
 inherited internal resize interface

Friends

class Matrix


Detailed Description

one-dimensional array of double used for vector computations

The Vector class represents column vectors. There is no notion of a row vector (because it is not needed).

Definition at line 69 of file VecMat.h.


Constructor & Destructor Documentation

Vector::Vector (  ) 

Constructor.

Definition at line 56 of file VecMat.cpp.

Referenced by clone(), and cloneEmpty().

Vector::Vector ( unsigned int  len,
bool  zero = false 
)

Constructor.

Definition at line 61 of file VecMat.cpp.

Vector::Vector ( const Array< double > &  other  ) 

Copy constructor (deep copy).

Definition at line 67 of file VecMat.cpp.

Vector::Vector ( const Vector other  ) 

Copy constructor (deep copy).

Definition at line 73 of file VecMat.cpp.

Vector::~Vector (  ) 

Destructor.

Definition at line 78 of file VecMat.cpp.

Vector::Vector ( Array< double > &  other,
bool  reference 
) [protected]

protected constructor for internal use

Definition at line 114 of file VecMat.cpp.

Vector::Vector ( unsigned int *  d,
double *  e,
unsigned int  nd,
unsigned int  ne,
bool  reference 
) [protected]

protected constructor for internal use

Definition at line 119 of file VecMat.cpp.


Member Function Documentation

ArrayBase * Vector::clone (  )  const

Clone the vector (deep copy).

This method is inherited from ArrayBase.

Definition at line 104 of file VecMat.cpp.

References Vector().

ArrayBase * Vector::cloneEmpty (  )  const

Clone the class of the vector.

The method returns a new uninitialized object of the class of the current array.
This method is inherited from ArrayBase.

Definition at line 109 of file VecMat.cpp.

References Vector().

double Vector::norm (  )  const [inline]

Definition at line 94 of file VecMat.h.

References norm2().

Referenced by normalize().

double Vector::norm2 (  )  const

Definition at line 83 of file VecMat.cpp.

Referenced by norm().

bool Vector::normalize (  ) 

Definition at line 95 of file VecMat.cpp.

References norm().

void Vector::operator= ( double  value  )  [inline]

set all entries to the same value

Definition at line 91 of file VecMat.h.

void Vector::resize_i ( unsigned int *  d,
unsigned int  nd,
bool  copy 
) [protected]

inherited internal resize interface

Definition at line 124 of file VecMat.cpp.


Friends And Related Function Documentation

friend class Matrix [friend]

Definition at line 72 of file VecMat.h.


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