class CBNSProbVector : public vector

CBNSProbVector class is derived from the STL vector

Inheritance:


Public Fields

static int m_nCounter
This variable is used to check for the memory leaks in the program

Public Methods

virtual void Copy (CBNSProbVector &vProbVector)
Copies the contents of vProbVector

Public

Constructors and Destructor
CBNSProbVector ()
Default Constructor
CBNSProbVector (int nSize, double dFirst, ...)
Constructor with the variable argument list
CBNSProbVector (vector vProbVector)
Values in vProbVector are copied into this vector
CBNSProbVector (int nStates)
Sizes the vector to nStates
CBNSProbVector (CBNSProbVector& cProbVector)
Copy Constructor
virtual ~CBNSProbVector ()
Destructor
Out Functions
vector GetProbVector ()
Returns the values in vector
int GetNoOfStates ()
Returns the size of the vector
double GetAt (int nPos)
Returns the value at nPos
In Functions
void SetNoOfStates (int nStates)
Sets the size of the vector nStates
void SetProbVector (int nSize, double dFirst, ...)
A Variable list argument function
bool SetProbVector (vector& vProbVector)
Copies the contents of vProbVector and returns true if succeeded
bool SetProbVector (CBNSProbVector& cProbVector)
Copies the contents of cProbVector and returns true if succeeded
bool SetAt (int nPos, double dValue)
Sets the value at nPos to dValue and returns true if succeeded
Utility Functions
void NormalizeVector ()
Normalizes the vector such that all the elements addup to one
void Reset (int nStates)
Resets the vector to nStates
void PrintBNSProbVector ()
Prints the vector to the console
bool IsNormalized ()
Returns true if the table is normailized
bool ValidateVectorValues ()
Returns true if all the values in the vector are positive
double Sum ()
Returns the sum of elements in the vector
Overloaded Operators
CBNSProbVector& operator / (double divideBy)
Division operator
CBNSProbVector& operator * (double dMultiple)
Multiplication operator
void operator /= (double divideBy)
Divides all the elements by divideBy
void operator *= (double dMultiple)
Multiplies all the elements by dMultiple
double operator [] (int nIndex) const
Index operator
double& operator [] (int nIndex)
Index operator
void operator = (vector &v)
Copy operator
void operator = (CBNSProbVector &cBNSProbVector)
Copy operator
bool operator == (vector &v)
Comparison operator
bool operator == ( CBNSProbVector &cBNSProbVector)
Comparison operator

Documentation

CBNSProbVector class is derived from the STL vector. This class helps to manipulate the conditional probability tables of the node
static int m_nCounter
This variable is used to check for the memory leaks in the program

Constructors and Destructor

CBNSProbVector()
Default Constructor

CBNSProbVector(int nSize, double dFirst, ...)
Constructor with the variable argument list
Parameters:
nSize - the size of the vector
dFirst - the first parameter

CBNSProbVector(vector vProbVector)
Values in vProbVector are copied into this vector
Parameters:
vProbVector - vector

CBNSProbVector(int nStates)
Sizes the vector to nStates
Parameters:
nStates - the number of states

CBNSProbVector(CBNSProbVector& cProbVector)
Copy Constructor
Parameters:
cProbVector - a reference to CBNSProbVector

virtual ~CBNSProbVector()
Destructor

virtual void Copy(CBNSProbVector &vProbVector)
Copies the contents of vProbVector
Parameters:
vProbVector - a CBNSProbVector

Out Functions

vector GetProbVector()
Returns the values in vector
Returns:
vector

int GetNoOfStates()
Returns the size of the vector
Returns:
int

double GetAt(int nPos)
Returns the value at nPos
Returns:
double
Parameters:
nPos - the position

In Functions

void SetNoOfStates(int nStates)
Sets the size of the vector nStates
Parameters:
nStates - the size of the vector

void SetProbVector(int nSize, double dFirst, ...)
A Variable list argument function
Parameters:
nSize - the size of the vector
dFirst - the double value, should be input with a decimal as 0.56 or 3.0 etc

bool SetProbVector(vector& vProbVector)
Copies the contents of vProbVector and returns true if succeeded
Returns:
bool
Parameters:
vProbVector - a reference to vector

bool SetProbVector(CBNSProbVector& cProbVector)
Copies the contents of cProbVector and returns true if succeeded
Returns:
bool
Parameters:
vProbVector - a reference to CBNSProbVector

bool SetAt(int nPos, double dValue)
Sets the value at nPos to dValue and returns true if succeeded. The function returns false if nPos in greater than the size of the vector
Returns:
bool
Parameters:
nPos - the position at which the value is set
dValue - the value

Utility Functions

void NormalizeVector()
Normalizes the vector such that all the elements addup to one

void Reset(int nStates)
Resets the vector to nStates
Parameters:
nStates - the size of the vector

void PrintBNSProbVector()
Prints the vector to the console

bool IsNormalized()
Returns true if the table is normailized
Returns:
bool

bool ValidateVectorValues()
Returns true if all the values in the vector are positive
Returns:
bool

double Sum()
Returns the sum of elements in the vector
Returns:
double

Overloaded Operators

CBNSProbVector& operator / (double divideBy)
Division operator

CBNSProbVector& operator * (double dMultiple)
Multiplication operator

void operator /= (double divideBy)
Divides all the elements by divideBy

void operator *= (double dMultiple)
Multiplies all the elements by dMultiple

double operator [] (int nIndex) const
Index operator

double& operator [](int nIndex)
Index operator

void operator = (vector &v)
Copy operator

void operator = (CBNSProbVector &cBNSProbVector)
Copy operator

bool operator == (vector &v)
Comparison operator

bool operator == ( CBNSProbVector &cBNSProbVector)
Comparison operator


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de