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

SVector Class Reference

#include <SVector.h>

List of all members.

Public Member Functions

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

Friends

class SMatrix
ostream & operator<< (ostream &strm, const SVector &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 SVector.h.


Constructor & Destructor Documentation

SVector::SVector  )  [inline]
 

Creates an array.

Definition at line 306 of file SVector.h.

References lda.

SVector::SVector int  i  )  [inline]
 

Creates an array and allocates memory.

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

Definition at line 315 of file SVector.h.

References allocate(), and lda.

SVector::SVector const SVector 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 SVector.h.

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

SVector::SVector int  dim,
float *  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 SVector.h.

References allocate(), F77_FUNC, and lda.

SVector::~SVector  )  [inline]
 

Destroy's the array and cleans up the memory.

Definition at line 388 of file SVector.h.

References deallocate().


Member Function Documentation

float SVector::AbsoluteSum  )  [inline]
 

Returns the Absolute Sum of the vector

Definition at line 140 of file SVector.h.

References F77_FUNC, and lda.

void SVector::allocate int  i  )  [inline]
 

Allocates memory for the array.

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

Definition at line 89 of file SVector.h.

References deallocate(), and lda.

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

float* SVector::array  )  [inline]
 

Gets a pointer to an array containing the array elements. floathe ordering of this array is NOfloat specified.

Definition at line 81 of file SVector.h.

Referenced by sgemv(), sgemv_t(), SLU_solve(), and SSYEV().

void SVector::deallocate  )  [inline]
 

Deallocates memory for the array.

Definition at line 115 of file SVector.h.

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

int SVector::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 SVector.h.

void SVector::get int  dim,
float *  rhs
[inline]
 

Copy all elements in a C array from the Vector

Definition at line 371 of file SVector.h.

References F77_FUNC, and lda.

int SVector::iMax  )  [inline]
 

Returns the index of the largest element in pArray

Definition at line 161 of file SVector.h.

References F77_FUNC, and lda.

float SVector::Norm  )  [inline]
 

Returns the Euclidean Norm of the vector

Definition at line 131 of file SVector.h.

References F77_FUNC, and lda.

SVector SVector::operator * float  rhs  )  [inline]
 

Returns the product of an array and a float.

Definition at line 217 of file SVector.h.

References F77_FUNC, lda, and pArray.

float SVector::operator * const SVector rhs  )  [inline]
 

Returns the dot product of two arrays.

Definition at line 194 of file SVector.h.

References F77_FUNC, lda, n_1, and pArray.

void SVector::operator *= float  C  )  [inline]
 

Sets this array equal to itself times a scalar value.

Definition at line 285 of file SVector.h.

References F77_FUNC, and lda.

float& SVector::operator() int  i  )  [inline]
 

Accesses element (i) of the array.

Definition at line 393 of file SVector.h.

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

Returns the sum of two arrays.

Definition at line 231 of file SVector.h.

References F77_FUNC, lda, n_1, and pArray.

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

Returns the difference of two arrays.

Definition at line 258 of file SVector.h.

References F77_FUNC, lda, n_1, and pArray.

void SVector::operator/= float  C  )  [inline]
 

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

Definition at line 295 of file SVector.h.

References F77_FUNC, and lda.

void SVector::operator= const float  C  )  [inline]
 

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

Definition at line 181 of file SVector.h.

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

Sets two arrays equal.

Definition at line 171 of file SVector.h.

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

void SVector::set int  ndim,
float *  rhs
[inline]
 

Copy all elements from a C array in the Vector

Definition at line 354 of file SVector.h.

References F77_FUNC, and lda.

int SVector::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 SVector.h.

float SVector::Sum  )  [inline]
 

Returns the Absolute Sum of the vector

Definition at line 149 of file SVector.h.


Friends And Related Function Documentation

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

Prints the array to a stream.

Definition at line 399 of file SVector.h.

friend class SMatrix [friend]
 

Definition at line 39 of file SVector.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