CAbstractStateDiscretizer Class Reference
Interface for all state
discretizer. More...
#include <cdiscretizer.h>
Inheritance diagram for CAbstractStateDiscretizer:
List of all
members.
Detailed Description
Interface for all state discretizer.
Normal state discretization is done by all subclasses of
CAbstractStateDiscretizer. CAbstractStateDiscretizer is a subclass
of CStateModifier. Normal state
discretization assigns a single discrete state index to the current
model state. This number is calculated by the function int
getDiscreteStateNumber(CStateCollection
*), which has to be implemented by all subclasses. This
function is called by the getModifiedState method and registered in
the target state.
CAbstractStateDiscretizer also offers you the possibility to
make state substitutions, which is done by addStateSubstitution.
With state substitutions you can replace a special discrete state
number with another state from a specified modifier. This is needed
if you want a more precise resolution of the model state only for
some specific discrete state numbers. It is also possible to add a
feature state as state substitution. The state discretizer produces
then feature states instead of discrete states.
Constructor & Destructor Documentation
|
CAbstractStateDiscretizer::CAbstractStateDiscretizer
|
( |
unsigned int |
numStates |
) |
|
|
| |
creates a state discretizer which with numState different
states.
|
| virtual
CAbstractStateDiscretizer::~CAbstractStateDiscretizer
|
( |
|
) |
[virtual] |
|
Member Function Documentation
| virtual void
CAbstractStateDiscretizer::addStateSubstitution
|
( |
int |
discState,
|
|
|
CStateModifier *
|
modifier |
|
) |
[virtual] |
|
| |
Adds a state substitution for a discrete state
index.
|
| virtual unsigned int
CAbstractStateDiscretizer::getDiscreteStateNumber
|
( |
CStateCollection *
|
state |
) |
[pure
virtual] |
|
| virtual unsigned int
CAbstractStateDiscretizer::getDiscreteStateSize
|
( |
|
) |
[virtual] |
|
| |
Returns the discrete State size of discretizer, this is the
discrete state of the 1st state variable.
Reimplemented from CStateProperties.
|
| virtual void
CAbstractStateDiscretizer::getModifiedState
|
( |
CStateCollection *
|
originalState,
|
|
|
CState *
|
modifiedState |
|
) |
[virtual] |
|
| |
Registers the discrete state number into the modified state
object.
The state number is calculated by the interface function
getDiscreteStateNumber. The getModifiedState method passes through
all state substitutions until the calculated state number is
reached, summing up all discrete state sizes of the modifiers from
the substitutions. This sum is than added to the calculated
discrete state number to make the state index unique again.
Whenever a substitution has been assigned to the current state
number, the state to substitute is calculated (or taken from the
state collection). Then the state is stored in the target state,
and the the calculated discrete state number + the sum of the state
sizes is added to all discrete state variables of the state
substitutions.
Implements CStateModifier.
|
| virtual void
CAbstractStateDiscretizer::removeStateSubstitution
|
( |
int |
discState |
) |
[virtual] |
|
| |
Removes the state substitution for the specified
state.
|
Member Data Documentation
| |
list of state substitutions
|
The documentation for this class was generated from the following
file:
|