Main Page | Namespace List | Class List | File List | Class Members | File Members

DVector Class Reference

#include <DVector.h>

List of all members.

Public Member Functions

int dim1 ()
int size ()
double * array ()
void allocate (int i)
void deallocate ()
double Norm ()
double AbsoluteSum ()
double Sum ()
int iMax ()
void operator= (const DVector &rhs)
void operator= (const double C)
double operator * (const DVector &rhs)
DVector operator * (double rhs)
DVector operator+ (const DVector &rhs)
DVector operator- (const DVector &rhs)
void operator *= (double C)
void operator/= (double C)
 DVector ()
 DVector (int i)
 DVector (const DVector &rhs)
 DVector (int dim, double *rhs)
void set (int ndim, double *rhs)
void get (int dim, double *rhs)
 ~DVector ()
double & operator() (int i)

Friends

class DMatrix
ostream & operator<< (ostream &strm, const DVector &rhs)


Detailed Description

A 1-dimensional template for making arrays. All of the memory allocation and deallocation details are dealt with by the class.

Definition at line 36 of file DVector.h.


Constructor & Destructor Documentation

DVector::DVector  )  [inline]
 

Creates an array.

Definition at line 306 of file DVector.h.

References lda.

DVector::DVector int  i  )  [inline]
 

Creates an array and allocates memory.

Parameters:
i size of the array's first dimension.

Definition at line 315 of file DVector.h.

References allocate(), and lda.

DVector::DVector const DVector rhs  )  [inline]
 

Creates an array and sets it equal to another array.

Parameters:
rhs array to set this array equal to.

Definition at line 324 of file DVector.h.

References allocate(), F77_FUNC, lda, n_1, and pArray.

DVector::DVector int  dim,
double *  rhs
[inline]
 

Creates an array and sets it equal to a C array.

Parameters:
C array to set this array equal to.

Definition at line 339 of file DVector.h.

References allocate(), F77_FUNC, and lda.

DVector::~DVector  )  [inline]
 

Destroy's the array and cleans up the memory.

Definition at line 388 of file DVector.h.

References deallocate().


Member Function Documentation

double DVector::AbsoluteSum  )  [inline]
 

Returns the Absolute Sum of the vector

Definition at line 140 of file DVector.h.

References F77_FUNC, and lda.

void DVector::allocate int  i  )  [inline]
 

Allocates memory for the array.

Parameters:
i size of the array's first dimension.

Definition at line 89 of file DVector.h.

References deallocate(), and lda.

Referenced by DVector(), main(), and operator=().

double* DVector::array  )  [inline]
 

Gets a pointer to an array containing the array elements. doublehe ordering of this array is NOdouble specified.

Definition at line 81 of file DVector.h.

Referenced by dgemv(), dgemv_t(), DLU_solve(), and DSYEV().

void DVector::deallocate  )  [inline]
 

Deallocates memory for the array.

Definition at line 115 of file DVector.h.

Referenced by allocate(), and ~DVector().

int DVector::dim1  )  [inline]
 

Gets the number of elements in the array's first dimension.

Returns:
number of elements in the array's first dimension.

Definition at line 68 of file DVector.h.

void DVector::get int  dim,
double *  rhs
[inline]
 

Copy all elements in a C array from the Vector

Definition at line 371 of file DVector.h.

References F77_FUNC, and lda.

int DVector::iMax  )  [inline]
 

Returns the index of the largest element in pArray

Definition at line 161 of file DVector.h.

References F77_FUNC, and lda.

double DVector::Norm  )  [inline]
 

Returns the Euclidean Norm of the vector

Definition at line 131 of file DVector.h.

References F77_FUNC, and lda.

DVector DVector::operator * double  rhs  )  [inline]
 

Returns the product of an array and a double.

Definition at line 217 of file DVector.h.

References F77_FUNC, lda, and pArray.

double DVector::operator * const DVector rhs  )  [inline]
 

Returns the dot product of two arrays.

Definition at line 194 of file DVector.h.

References F77_FUNC, lda, n_1, and pArray.

void DVector::operator *= double  C  )  [inline]
 

Sets this array equal to itself times a scalar value.

Definition at line 285 of file DVector.h.

References F77_FUNC, and lda.

double& DVector::operator() int  i  )  [inline]
 

Accesses element (i) of the array.

Definition at line 393 of file DVector.h.

DVector DVector::operator+ const DVector rhs  )  [inline]
 

Returns the sum of two arrays.

Definition at line 231 of file DVector.h.

References F77_FUNC, lda, n_1, and pArray.

DVector DVector::operator- const DVector rhs  )  [inline]
 

Returns the difference of two arrays.

Definition at line 258 of file DVector.h.

References F77_FUNC, lda, n_1, and pArray.

void DVector::operator/= double  C  )  [inline]
 

Sets this array equal to itself divided by a scalar value.

Definition at line 295 of file DVector.h.

References F77_FUNC, and lda.

void DVector::operator= const double  C  )  [inline]
 

Sets all of the elements in an array equal to the same value.

Definition at line 181 of file DVector.h.

void DVector::operator= const DVector rhs  )  [inline]
 

Sets two arrays equal.

Definition at line 171 of file DVector.h.

References allocate(), F77_FUNC, lda, n_1, and pArray.

void DVector::set int  ndim,
double *  rhs
[inline]
 

Copy all elements from a C array in the Vector

Definition at line 354 of file DVector.h.

References F77_FUNC, and lda.

int DVector::size  )  [inline]
 

Gets the total number of elements in the array.

Returns:
total number of elements in the array.

Definition at line 75 of file DVector.h.

double DVector::Sum  )  [inline]
 

Returns the Absolute Sum of the vector

Definition at line 149 of file DVector.h.


Friends And Related Function Documentation

friend class DMatrix [friend]
 

Definition at line 39 of file DVector.h.

ostream& operator<< ostream &  strm,
const DVector rhs
[friend]
 

Prints the array to a stream.

Definition at line 399 of file DVector.h.


The documentation for this class was generated from the following file:
Generated on Wed Aug 16 19:03:50 2006 for MyLapack by  doxygen 1.4.4