template class CBNSRange

This templatized class defines the ranges for the states of the nodes in Bayesian network

Public

Constructors and Destructor
CBNSRange (T tMin, T tMax)
Constructor with minimum and maximum value for the range
CBNSRange (T tValue)
Constructor with a unique value for the range, the minimum and maximum are set to tValue
~CBNSRange ()
Destructor
Out Functions
T GetMin ()
Returns the minimum value of the range
T GetMax ()
Returns the maximum value of the range
string GetLabel ()
Returns the label of the range
Test Functions
bool IsIn (T tTest)
Returns true if the value tTest falls in the range, ie
bool IsOverlap (CBNSRange& cRange)
Returns true if the maximum and minimum value of the cRange overlap with the maximum or minimum value of this range
In Functions
void Set (T tMin, T tMax)
Sets the minimum and maximum value of the range
void Set (T tValue)
Sets the minimum and maximum value of the range to tValue
void SetRangeWithLabel (T tMin, T tMax, string strLabel)
Sets the minimum, maximum and the strLabel of the range
void SetWithLabel (T tValue, string strLabel)
Sets the minimum, maximum to tValue and the label to strLabel
void SetLabel (string strLabel)
Sets the label of the range to strLabel
Overloaded Operators
operator T ()
Type cast operator
bool operator< (CBNSRange& cVar)
Less than operator
bool operator> (CBNSRange& cVar)
Greater than operator
bool operator== (CBNSRange& cVar)
Equal to operator
bool operator== (T& tValue)
Equal to operator
void operator= (const CBNSRange& cRange)
Assignment operator

Private

Private Member Variables
T m_tMin
Minimum value of the range
T m_tMax
Maximum value of the range
string m_strLabel
The label of the range

Documentation

This templatized class defines the ranges for the states of the nodes in Bayesian network. For example, for good operation of a process, the process variable should fall between 95 and 105\% of the optimal value. Therefore the bad state of the variable will have two ranges, viz. [0 95] and [105 200], assuming that the process variable doesnt exceed more than 200\% of the optimal value.
Private Member Variables

T m_tMin
Minimum value of the range

T m_tMax
Maximum value of the range

string m_strLabel
The label of the range

Constructors and Destructor

CBNSRange(T tMin, T tMax)
Constructor with minimum and maximum value for the range
Parameters:
tMin - minimum value of the range
tMax - maximum value of the range

CBNSRange(T tValue)
Constructor with a unique value for the range, the minimum and maximum are set to tValue
Parameters:
tValue - the minimum and maximum value are set to this

~CBNSRange()
Destructor

Out Functions

T GetMin()
Returns the minimum value of the range
Returns:
T

T GetMax()
Returns the maximum value of the range
Returns:
T

string GetLabel()
Returns the label of the range
Returns:
string

Test Functions

bool IsIn(T tTest)
Returns true if the value tTest falls in the range, ie., if tMin <= tTest <= tMax.
Returns:
bool
Parameters:
tTest - the test value

bool IsOverlap(CBNSRange& cRange)
Returns true if the maximum and minimum value of the cRange overlap with the maximum or minimum value of this range
Parameters:
cRange - the range tested for overlapping

In Functions

void Set(T tMin, T tMax)
Sets the minimum and maximum value of the range
Parameters:
tMin - the minimum value of the range
tMax - the maximum value of the range

void Set(T tValue)
Sets the minimum and maximum value of the range to tValue
Parameters:
tValue - the minimum and maximum of the range is set to this value

void SetRangeWithLabel(T tMin, T tMax, string strLabel)
Sets the minimum, maximum and the strLabel of the range
Parameters:
tMin - the minimum value
tMax - the maximum value
strLabel - the label of the range

void SetWithLabel(T tValue, string strLabel)
Sets the minimum, maximum to tValue and the label to strLabel
Parameters:
tValue - the minimum and maximum of the range is set to this value
strLabel - the label of the range

void SetLabel(string strLabel)
Sets the label of the range to strLabel
Parameters:
strLabel - the label of the range

Overloaded Operators

operator T()
Type cast operator

bool operator<(CBNSRange& cVar)
Less than operator

bool operator>(CBNSRange& cVar)
Greater than operator

bool operator==(CBNSRange& cVar)
Equal to operator

bool operator==(T& tValue)
Equal to operator

void operator=(const CBNSRange& cRange)
Assignment 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