public static class GraphDefinedDomain.GraphStateModel extends java.lang.Object implements FullStateModel
FullStateModel.Helper
Modifier and Type | Field and Description |
---|---|
protected java.util.Random |
rand |
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> |
transitionDynamics
The transition dynamics to use
|
Constructor and Description |
---|
GraphStateModel(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> |
getTransitionDynamics() |
State |
sample(State s,
Action a)
Samples and returns a
State from a state transition function. |
void |
setTransitionDynamics(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics) |
java.util.List<StateTransitionProb> |
stateTransitions(State s,
Action a)
|
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics
protected java.util.Random rand
public GraphStateModel(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics)
public java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> getTransitionDynamics()
public void setTransitionDynamics(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics)
public java.util.List<StateTransitionProb> stateTransitions(State s, Action a)
FullStateModel
Action
is applied in State
s. The returned
list only needs to include transitions that have non-zero probability of occurring.stateTransitions
in interface FullStateModel
s
- the source statea
- the action to be applied in the source stateStateTransitionProb
objects.public State sample(State s, Action a)
SampleStateModel
State
from a state transition function.sample
in interface SampleStateModel
s
- the source statea
- the action to be executed in the source stateState