Agent for detecting non-converging oscillation in BP Objects of this class compare state vectors to previously seen state vectors If any vectors are repeating, oscillation is possible. This class uses a hashed checksum to compare state vectors (cheap) then uses explicit state comparisons (expensive) when collisions are detected in checksums.
More...
#include <OscillationDetector.h>
List of all members.
Detailed Description
Agent for detecting non-converging oscillation in BP Objects of this class compare state vectors to previously seen state vectors If any vectors are repeating, oscillation is possible. This class uses a hashed checksum to compare state vectors (cheap) then uses explicit state comparisons (expensive) when collisions are detected in checksums.
Constructor & Destructor Documentation
OscillationDetector::OscillationDetector
|
( |
int
|
newLength
) |
|
- Parameters:
-
[in] | newLength | size of state vectors |
Member Function Documentation
bool OscillationDetector::checkState
|
( |
double *
|
a,
|
|
|
double *
|
b
|
|
) |
|
|
Check whether state has been seen before Each state consistes of two vectors
- Parameters:
-
[in] | a | first state vector |
[in] | b | second state vector |
- Returns:
- whether state has been seen before within epsilon tolerance
bool OscillationDetector::isOscillating
|
( |
) |
[inline]
|
Returns whether oscillation has been detected
- Returns:
- whether oscillation has been detected by a previous call to checkState()
The documentation for this class was generated from the following files: