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

rdFunction Class Reference

An abstract class for representing a function. More...

#include <rdFunction.h>

Inheritance diagram for rdFunction:

rdObject rdGCVSpline List of all members.

Public Member Functions

 rdFunction ()
 Default constructor.

 rdFunction (IDOM_Element *aElement)
 Construct a function from an XML Element.

 rdFunction (const rdFunction &aFunction)
 Copy constructor.

virtual ~rdFunction ()
 Destructor.

virtual rdFunction * copy () const=0
virtual rdFunction * copy (IDOM_Element *aElement) const=0
rdFunction & operator= (const rdFunction &aFunction)
 Assignment operator.

void setMinX (double aMinX)
 Set the minimum x independent variable.

double getMinX () const
 Get the minimum x independent variable.

void setMaxX (double aMaxX)
 Set the maximum x independent variable.

double getMaxX () const
 Get the maximum x independent variable.

void setMinY (double aMinY)
 Set the minimum y independent variable.

double getMinY () const
 Get the minimum y independent variable.

void setMaxY (double aMaxY)
 Set the maximum y independent variable.

double getMaxY () const
 Get the maximum y independent variable.

void setMinZ (double aMinZ)
 Set the minimum z independent variable.

double getMinZ () const
 Get the minimum z independent variable.

void setMaxZ (double aMaxZ)
 Set the maximum z independent variable.

double getMaxZ () const
 Get the maximum z independent variable.

virtual void updateBoundingBox ()=0
virtual double evaluate (int aDerivOrder, double aX=0.0, double aY=0.0, double aZ=0.0)=0
virtual void updateObject (bool aDeep=true)
 Update this object based on its XML node.

virtual void updateNode (bool aDeep=true)
 Update the XML node representing this object.

virtual void generateNode (IDOM_Element *aParent)
 Generate an XML node representing this object.

void updateData ()
 Update the member data of this object based on its XML node.


Static Public Attributes

const char DEFAULT_NAME [] = "default"
const char PROP_MIN_X [] = "min_x"
const char PROP_MIN_Y [] = "min_y"
const char PROP_MIN_Z [] = "min_z"
const char PROP_MAX_X [] = "max_x"
const char PROP_MAX_Y [] = "max_y"
const char PROP_MAX_Z [] = "max_z"

Protected Attributes

double _minX
 Minimum value of the x independent variable.

double _maxX
 Maximum value of the x independent variable.

double _minY
 Minimum value of the y independent variable.

double _maxY
 Maximum value of the y independent variable.

double _minZ
 Minimum value of the z independent variable.

double _maxZ
 Maximum value of the z independent variable.


Private Member Functions

void setNull ()
 Set all member variables to NULL values.

void setEqual (const rdFunction &aFunction)
 Set all member variables equal to the members of another object.


Detailed Description

An abstract class for representing a function.

A function is a relation between independent variables and a dependent value such that for any particular set of independent variables there is only one unique dependent value. Values of the function and its derivatives are obtained by calling the evaluate() method. The curve may or may not be finite or diferentiable; the evaluate method returns values between rdMath::MINUS_INFINITY and rdMath::PLUS_INFINITY, or it returns rdMath::NAN (not a number) if the curve is not defined. Currently, functions of up to 3 variables (x,y,z) are supported.

Author:
Frank C. Anderson


Constructor & Destructor Documentation

rdFunction::rdFunction IDOM_Element *  aElement  ) 
 

Construct a function from an XML Element.

Parameters:
aElement XML element.

rdFunction::rdFunction const rdFunction &  aFunction  ) 
 

Copy constructor.

Parameters:
aFunction Function to copy.


Member Function Documentation

void rdFunction::generateNode IDOM_Element *  aParent  )  [virtual]
 

Generate an XML node representing this object.

Parameters:
aParent Intended parent of the node to be generated. If aParent is NULL, the intent is for this object to serve as the root element of a new document.
See also:
rdObject::generateNode()

Reimplemented from rdObject.

Reimplemented in rdGCVSpline.

double rdFunction::getMaxX  )  const
 

Get the maximum x independent variable.

Returns:
Maximum x.

double rdFunction::getMaxY  )  const
 

Get the maximum y independent variable.

Returns:
Maximum y.

double rdFunction::getMaxZ  )  const
 

Get the maximum z independent variable.

Returns:
Maximum z.

double rdFunction::getMinX  )  const
 

Get the minimum x independent variable.

Returns:
Minimum x.

double rdFunction::getMinY  )  const
 

Get the minimum y independent variable.

Returns:
Minimum y.

double rdFunction::getMinZ  )  const
 

Get the minimum z independent variable.

Returns:
Minimum z.

rdFunction & rdFunction::operator= const rdFunction &  aFunction  ) 
 

Assignment operator.

Returns:
Reference to this object.

void rdFunction::setEqual const rdFunction &  aFunction  )  [private]
 

Set all member variables equal to the members of another object.

Note that this method is private. It is only meant for copying the data members defined in this class. It does not, for example, make any changes to data members of base classes.

void rdFunction::setMaxX double  aMaxX  ) 
 

Set the maximum x independent variable.

Parameters:
aMaxX Maximum x.

void rdFunction::setMaxY double  aMaxY  ) 
 

Set the maximum y independent variable.

Parameters:
aMaxY Maximum y.

void rdFunction::setMaxZ double  aMaxZ  ) 
 

Set the maximum z independent variable.

Parameters:
aMaxZ Maximum z.

void rdFunction::setMinX double  aMinX  ) 
 

Set the minimum x independent variable.

Parameters:
aMinX Minimum x.

void rdFunction::setMinY double  aMinY  ) 
 

Set the minimum y independent variable.

Parameters:
aMinY Minimum y.

void rdFunction::setMinZ double  aMinZ  ) 
 

Set the minimum z independent variable.

Parameters:
aMinZ Minimum z.

void rdFunction::updateData  ) 
 

Update the member data of this object based on its XML node.

Member objects (children) are not updated.

Reimplemented in rdGCVSpline.

void rdFunction::updateNode bool  aDeep = true  )  [virtual]
 

Update the XML node representing this object.

Parameters:
aDeep If true, update the XML node of this object AND the XML nodes of all class members that are rdObjects (child nodes); if false, update only the XML node of this object without updating the XML nodes of its children.

Reimplemented from rdObject.

Reimplemented in rdGCVSpline.

void rdFunction::updateObject bool  aDeep = true  )  [virtual]
 

Update this object based on its XML node.

Parameters:
aDeep If true, update this object and all its child objects (that is, member variables that are rdObject's); if false, update only the member variables that are not rdObject's.

Reimplemented from rdObject.

Reimplemented in rdGCVSpline.


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