Class SanityChecks
java.lang.Object
SanityChecks
public class SanityChecks
- extends java.lang.Object
Just a series of simple checks to prevent stupid mismatches.
A truly well-engineered solution would make it impossible
to generate a mismatch. For version 1.0, we'll just make
simple sanity checking available instead.
- Since:
- 1.0
Method Summary |
static boolean |
dimensionCheck(IAgent agent,
double[] arrLfContState,
StateBundle[] arrStates)
Checks that the dimensionality of a continuous state vector,
vector of discrete state descriptions, and agent internal
state all match up. |
static boolean |
stateCheck(IAgent agent,
StateBundle[] arrStates)
checks that the agent knows how to handle each state in
the state array (and that the states are not null) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SanityChecks
public SanityChecks()
dimensionCheck
public static boolean dimensionCheck(IAgent agent,
double[] arrLfContState,
StateBundle[] arrStates)
- Checks that the dimensionality of a continuous state vector,
vector of discrete state descriptions, and agent internal
state all match up.
- Parameters:
agent
- descriptionarrLfContState
- continuous state state-vectorarrStates
- array of discrete states (one for each agent)
- Returns:
- true if everything checks out, false otherwise
stateCheck
public static boolean stateCheck(IAgent agent,
StateBundle[] arrStates)
- checks that the agent knows how to handle each state in
the state array (and that the states are not null)
- Parameters:
agent
- descriptionarrStates
- array of discrete states (one for each agent)
- Returns:
- true if everything checks out, false otherwise