Public Member Functions

OscillationDetector Class Reference

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.

Public Member Functions

 OscillationDetector (int newLength)
bool  checkState (double *a, double *b)
bool  isOscillating ()

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]newLengthsize 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]afirst state vector
[in]bsecond 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:
 All Classes Namespaces Files Functions Variables Defines