Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdControlLinearNode Class Reference

A control node used to reconstruct a piecewise linear control. More...

#include <rdControlLinearNode.h>

List of all members.

Public Member Functions

 rdControlLinearNode (double aT=0.0, double aX=0.0, double aMin=0.0, double aMax=1.0)
 Default constructor.

 rdControlLinearNode (const rdControlLinearNode &aNode)
 Copy constructor.

rdControlLinearNode & operator= (const rdControlLinearNode &aControl)
 Assignment operator.

bool operator== (const rdControlLinearNode &aControl) const
 Equality operator.

bool operator< (const rdControlLinearNode &aControl) const
 Less than operator.

void setTime (double aT)
 Set the time at which this control node occurs.

double getTime () const
 Get the time at which this control node occurs.

void setValue (double aX)
 Set the value of this control node.

double getValue () const
 Get the value of this control node.

void setMin (double aMin)
 Set the minimum allowed value of this control node.

double getMin () const
 Get the minimum allowed value of this control node.

void setMax (double aMax)
 Set the maximum allowed value of this control node.

double getMax () const
 Get the maximum allowed value of this control node.

char * toString () const
 Convert the node to a string representation.


Static Public Member Functions

void SetEqualityTolerance (double aTol)
 Set the tolerance for determining equality of nodes.

double GetEqualityTolerance ()
 Get the tolerance for determining equality of nodes.


Protected Attributes

double _t
 Time at which the node occurs.

double _x
 Control value of the node.

double _min
 Minimum control value of the node.

double _max
 Maximum control value of the node.


Static Protected Attributes

double _EqualityTolerance = rdMath::ZERO
 Equality tolerance.


Detailed Description

A control node used to reconstruct a piecewise linear control.

The member variables consist of a time, a value, a minimum value, and a maximum value. So that an rdArray<T> can be instantiated for rdControlLinearNode, this class implements a default constructor, a copy constructor, the assignment operator (=), the equality operator (==), and the less than operator (<). The time at which a control node occurs is used to determine the results of the operators == and <.

Author:
Frank C. Anderson
Version:
1.0
See also:
rdControlLinear


Constructor & Destructor Documentation

rdControlLinearNode::rdControlLinearNode double  aT = 0.0,
double  aX = 0.0,
double  aMin = 0.0,
double  aMax = 1.0
 

Default constructor.

Parameters:
aT Time.
aX Control value.
aMin Minimum allowed control value.
aMax Maximum allowed control value.

rdControlLinearNode::rdControlLinearNode const rdControlLinearNode &  aNode  ) 
 

Copy constructor.

Parameters:
aControl Control to copy.


Member Function Documentation

double rdControlLinearNode::GetEqualityTolerance  )  [static]
 

Get the tolerance for determining equality of nodes.

Equality of nodes is dertermined by comparing _time member varaibles. If two nodes have the same value for _time within the set equality tolerance, the two nodes are considered equal.

Note that the member variable _EqualityTolerance and this method are static. So, the specified equality tolerance affects all nodes.

Returns:
Equality tolerance.
See also:
==

double rdControlLinearNode::getMax  )  const
 

Get the maximum allowed value of this control node.

Returns:
Maximum allowed value of this control node.

double rdControlLinearNode::getMin  )  const
 

Get the minimum allowed value of this control node.

Returns:
Minimum allowed value of this control node.

double rdControlLinearNode::getTime  )  const
 

Get the time at which this control node occurs.

Returns:
Time at which this control node occurs.

double rdControlLinearNode::getValue  )  const
 

Get the value of this control node.

Returns:
Value of this control node.

bool rdControlLinearNode::operator< const rdControlLinearNode &  aControl  )  const
 

Less than operator.

Parameters:
aNode Node with which to evaluate less than.
Returns:
True if the time of this node is less than the time of aNode.

rdControlLinearNode & rdControlLinearNode::operator= const rdControlLinearNode &  aControl  ) 
 

Assignment operator.

Returns:
Reference to the altered object.

bool rdControlLinearNode::operator== const rdControlLinearNode &  aControl  )  const
 

Equality operator.

Equality of nodes is dertermined by comparing the _time member varaibles. If two nodes have the same value for _time within the set equality tolerance, the two nodes are considered equal:

Parameters:
aNode Node with which to evaluate equality.
Returns:
True if the times are equal, false otherwise.

void rdControlLinearNode::SetEqualityTolerance double  aTol  )  [static]
 

Set the tolerance for determining equality of nodes.

Equality of nodes is dertermined by comparing _time member varaibles. If two nodes have the same value for _time within the set equality tolerance, the two nodes are considered equal.

Note that the member variable _EqualityTolerance and this method are static. So, the specified equality tolerance affects all nodes.

Parameters:
aTol Equality tolerance. The equality tolerance must be 0.0 or positive. If a negative tolerance is sent in, the equality tolerance is set to 0.0.
See also:
==

void rdControlLinearNode::setMax double  aMax  ) 
 

Set the maximum allowed value of this control node.

Parameters:
aMax Maximum allowed value of this control node. If aMax is less than the current minimum allowed value, the current minimum allowed value is set to aMax.

void rdControlLinearNode::setMin double  aMin  ) 
 

Set the minimum allowed value of this control node.

Parameters:
aMin Minimum allowed value of this control node. If aMin is greater than the current maximum allowed value, the current maximum allowed value is set to aMin.

void rdControlLinearNode::setTime double  aT  ) 
 

Set the time at which this control node occurs.

Parameters:
aTime Time at which this control node occurs.

void rdControlLinearNode::setValue double  aX  ) 
 

Set the value of this control node.

Parameters:
aValue Value of this control node.

char * rdControlLinearNode::toString  )  const
 

Convert the node to a string representation.

The caller is responsible for deleting the returned string.

Returns:
String representation of the node.


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:10 2003 for Simulation Software by doxygen1.3