template <class T> class DVecType : public DVector

Typed data vector class template.

Inheritance:


Public Methods

DVecType(void)
Empty vector constructor
explicit DVecType(const DVector& dv)
Copy constructor.
DVecType(const DVecType& dv, size_t len)
Copy constructor.
explicit DVecType(size_t len, const T* data=0)
Data constructor.
~DVecType()
Destructor.
void ReSize(size_t len)
Resize the data vector.
void setLength(size_t len)
Set the data length
void Clear(void)
Empty the vector
void Conjugate(void)
Complex conjugate.
DVector* Extract(size_t len) const
Extract a substring from a vector.
DVector* Extract(size_t inx, size_t len) const
Extract a substring from a vector.
DVector* Extract(size_t inx, size_t len, size_t inc) const
Extract and decimate a substring from a vector.
size_t getLength(void) const
Get the data length.
DVector::size_t getSize(void) const
Get data word size.
DVType getType(void) const
Get the data type.
void Append(size_t inx, const short* data)
Append data.
void* refData(void)
Get a data pointer.
T* refTData(void)
Get a data pointer.
size_t getData(size_t inx, size_t len, short data[]) const
Copy data vector to an array.
short getShort(size_t inx) const
Get one data word.
int getInt(size_t inx) const
Get one data word.
float getFloat(size_t inx) const
Get one data word.
double getDouble(size_t inx) const
Get one data word.
fComplex getCplx(size_t inx) const
Get one data word.
double getMaximum(void) const
Maximum data value.
double getMinimum(void) const
Minimum data value.
size_t getNBetween(double low, double high) const
Number of entries in range.
size_t getNGreater(double limit) const
Number of entries greater than limit.
size_t getNLess(double limit) const
Number of entries less than limit.
double VSum(size_t inx, size_t N) const
Get one data word.
DVector& operator=(const DVector& rhs)
Assignment operator.
bool operator==(const DVector& rhs) const
Assignment operator.
double operator*(const DVector& rhs) const
Inner product.
DVector& operator+=(const DVector& rhs)
Add a DVector.
DVector& operator-=(const DVector& rhs)
Subtract a DVector.
DVector& operator+=(double rhs)
Bias a DVType.
DVector& operator*=(double rhs)
Scale a DVType.
DVector& operator*=(const DVector& rhs)
Element by element multiplication of DVector.
DVector& operator/=(const DVector& rhs)
Divide by a DVector.
T& operator[] (size_t inx)
Reference a Vector element.
const T& operator[] (size_t inx) const
Reference a Vector element.
ostream& Dump(ostream& out) const
Print the data.

Inherited from DVector:

Public Classes

enum DVType

Public Fields

typedef unsigned int size_t

Public Methods

virtual DVector* DupVector(void) const
const char* getTypeName(void) const
bool S_data(void) const
bool I_data(void) const
bool F_data(void) const
bool D_data(void) const
bool C_data(void) const
virtual DVector& operator =(const DVector& rhs)
void Extend(size_t N)

Documentation

The typed data vector template describes the classes based on DVector which contain vectors of variously typed data.
DVecType(void)
Empty vector constructor

explicit DVecType(const DVector& dv)
Create a DVector with the same length and data as the argument.

DVecType(const DVecType& dv, size_t len)
Create a DVector with the same data as the argument, but a different length. This constructor

explicit DVecType(size_t len, const T* data=0)
A data vector is constructed with the specified size. If an initialization array is specified, the data are copied to the vector and the current length is set to 'len'. Otherwise, the current length is set to zero.

~DVecType()
Delete a typed DVector.

void ReSize(size_t len)
Allocate or expand the vector to make room for at least 'len' words. Write access to the data is also provided.
Parameters:
len - Minimum data vector size.

void setLength(size_t len)
Set the number of valid data words.
Parameters:
len - Number of valid data words.

void Clear(void)
Clear all data from the vector. Do not free any storage.

void Conjugate(void)
Replace each element with its complex conjugate.

DVector* Extract(size_t len) const
A new vector is generated from a substring of the vector data.

DVector* Extract(size_t inx, size_t len) const
A new vector is generated from a substring of the vector data.

DVector* Extract(size_t inx, size_t len, size_t inc) const
A new vector is generated from a decimated substring of the vector data.

size_t getLength(void) const
Returns the number of valid data words in the Data Vector.
Returns:
The number of valid data words.

DVector::size_t getSize(void) const
getSize return the size of a single data word in bytes.

DVType getType(void) const
Returns the data type as represented by the DVect::DVType enumerator.

void Append(size_t inx, const short* data)
concatenate the specified data vector to the end of the current data vector. The second argument to Append may be a short (shown), float or fComplex vector of length 'inx'.

void* refData(void)
Returns a (void*) pointer to the internal array. Both const and non-const references are available.

T* refTData(void)
Returns a pointer to the internal array. Both const and non-const references are available.

size_t getData(size_t inx, size_t len, short data[]) const
The specified words of the data vector are copied to an array ('data') and the number of words copied is returned. The data will be converted to the type of 'data' differs from that of the vector. The second argument may be a short, float or fComplex array.

short getShort(size_t inx) const
A data word is picked up from the DVector and converted to the named type.

int getInt(size_t inx) const
A data word is picked up from the DVector and converted to the named type.

float getFloat(size_t inx) const
A data word is picked up from the DVector and converted to the named type.

double getDouble(size_t inx) const
A data word is picked up from the DVector and converted to the named type.

fComplex getCplx(size_t inx) const
A data word is picked up from the DVector and converted to the named type.

double getMaximum(void) const
Return the largest entry. If the vector is complex, the largest real part is returned.
Returns:
Largest data value.

double getMinimum(void) const
Return the smallest entry. If the vector is complex, the smallest real part is returned.
Returns:
Smallest data value.

size_t getNBetween(double low, double high) const
Count the number of entries with value greater than the specified limit. If the vector is complex, the real part is compared.
Returns:
Number of entries greater than limit.
Parameters:
low - Lower limit of entries to be counted.
high - Upper limit of entries to be counted.

size_t getNGreater(double limit) const
Count the number of entries with value greater than the specified limit. If the vector is complex, the real part is compared.
Returns:
Number of entries greater than limit.
Parameters:
limit - Lower limit of entries to be counted.

size_t getNLess(double limit) const
Count the number of entries with value less than the specified limit. If the vector is complex, the real part is compared.
Returns:
Number of entries less than limit.
Parameters:
limit - Upper limit of entries to be counted.

double VSum(size_t inx, size_t N) const
The elements of a specified sub-vector are converted to double and summed.
Returns:
The sum of the specified elements.
Parameters:
inx - The first element to be summed.
N - The number of elements to be summed.

DVector& operator=(const DVector& rhs)
Data from the rhs DVector are converted to the lhs DVector type and copied to the lhs Vector.

bool operator==(const DVector& rhs) const
Data from the rhs DVector are converted to the lhs DVector type and compared to the lhs Vector.

double operator*(const DVector& rhs) const
Calculate the inner (dot) product between two DVectors.

DVector& operator+=(const DVector& rhs)
Data from the rhs DVector are converted to the lhs DVector type and added to the lhs Vector.

DVector& operator-=(const DVector& rhs)
Data from the rhs DVector are converted to the lhs DVector type and subtracted from the lhs Vector.

DVector& operator+=(double rhs)
The rhs constant is added the each element of the lhs Vector.

DVector& operator*=(double rhs)
Each element of the lhs Vector is multiplied by the rhs constant.

DVector& operator*=(const DVector& rhs)
Each element of the lhs DVector is multiplied by the corresponding element of rhs.
Returns:
Reference to the resulting DVector.
Parameters:
rhs - Multiplier DVector.

DVector& operator/=(const DVector& rhs)
Each element of the lhs DVector is divided by the corresponding element of rhs.
Returns:
Reference to the resulting DVector.
Parameters:
rhs - Denominator DVector.

T& operator[] (size_t inx)
A reference to the specified vector element is returned.
Returns:
Reference a Vector element.
Parameters:
inx - Index of element to be accessed.

const T& operator[] (size_t inx) const
A constant reference to the vector element is returned. Constant and non-constant references are implemented.
Parameters:
inx - Index of element to be accessed.

ostream& Dump(ostream& out) const
The data in the DVType vector are formatted and copied to the specified ostream.


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++