FunctionCollection Class Reference

List of all members.


Detailed Description

Collection of functions.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date

Definition at line 22 of file FunctionCollection.hpp.


Public Member Functions

 FunctionCollection ()
 Default constructor for restoration from serialization.
 FunctionCollection (const unsigned int N)
 Construct new collection of functions.
virtual ~FunctionCollection ()
 Destructor.
virtual double getFunction (const unsigned int index) const
 Get the value of a function.
virtual void setFunction (const unsigned int index, f_t value)
 Set a function in the collection.
virtual void setFunction (const unsigned int index, FunctionModel *value)
 Set a function in the collection using an object rather than a static function.
bool isStatic (const unsigned int index)
 Is a function static?
virtual void setObject (void *object)
 Set the object passed as an argument to all static functions when called.
void evaluateAll (const double t, const double y[])
 Evaluate all functions in the collection for a given time and state, and store the results for subsequent calls to getFunction().

Constructor & Destructor Documentation

FunctionCollection (  ) 

Default constructor for restoration from serialization.

Definition at line 12 of file FunctionCollection.cpp.

FunctionCollection ( const unsigned int  N  ) 

Construct new collection of functions.

Parameters:
N Number of functions.

Definition at line 16 of file FunctionCollection.cpp.

~FunctionCollection (  )  [virtual]

Destructor.

Definition at line 27 of file FunctionCollection.cpp.


Member Function Documentation

double getFunction ( const unsigned int  index  )  const [inline, virtual]

Get the value of a function.

Parameters:
index Index of the function.
Returns:
The value of the function the last time it was evaluated by a call to evaluate().

Definition at line 161 of file FunctionCollection.hpp.

void setFunction ( const unsigned int  index,
f_t  value 
) [virtual]

Set a function in the collection.

Parameters:
index Index of the function to set.
value The function.

Definition at line 31 of file FunctionCollection.cpp.

void setFunction ( const unsigned int  index,
FunctionModel value 
) [virtual]

Set a function in the collection using an object rather than a static function.

Parameters:
index Index of the function to set.
value Object encapsulating the function. The caller retains ownership.

Definition at line 40 of file FunctionCollection.cpp.

bool isStatic ( const unsigned int  index  ) 

Is a function static?

Parameters:
index Index of the function to check.
Returns:
True if the given function is static, false otherwise.

Definition at line 50 of file FunctionCollection.cpp.

void setObject ( void *  object  )  [virtual]

Set the object passed as an argument to all static functions when called.

Parameters:
object The object. The caller retains ownership.

Definition at line 68 of file FunctionCollection.cpp.

void evaluateAll ( const double  t,
const double  y[] 
)

Evaluate all functions in the collection for a given time and state, and store the results for subsequent calls to getFunction().

Parameters:
t The time.
y Array holding values of state variables at time t.

Definition at line 57 of file FunctionCollection.cpp.


Generated on Wed Dec 17 15:11:58 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3