|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.algorithm.template.TransitionPath
public class TransitionPath
A (randomized) path through state space S by transition τ of a TransitionModel.
This iterator will randomly follow a path from the given initial state under the given actions according to the probabilities of the transition τ.
Constructor Summary | |
---|---|
TransitionPath(TransitionModel transition,
java.util.Iterator actions,
java.lang.Object initialState)
Create a new (randomized) path through a transition model. |
Method Summary | |
---|---|
java.util.Random |
getRandom()
Get the random-generator used as probabilistic random source. |
boolean |
hasNext()
|
boolean |
isCorrect()
Whether this algorithm is correct. |
java.lang.Object |
next()
Advance to the next state of the path. |
void |
remove()
|
void |
setRandom(java.util.Random randomGenerator)
Set the random-generator to use as probabilistic random source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransitionPath(TransitionModel transition, java.util.Iterator actions, java.lang.Object initialState)
transition
- the transition model τ through which to create a path.actions
- the iterator of the actions to perform.initialState
- the initial state s0∈S from which to start the path.Method Detail |
---|
public boolean isCorrect()
ProbabilisticAlgorithm
isCorrect
in interface ProbabilisticAlgorithm
public java.util.Random getRandom()
ProbabilisticAlgorithm
getRandom
in interface ProbabilisticAlgorithm
public void setRandom(java.util.Random randomGenerator)
ProbabilisticAlgorithm
Especially called to change the random source to a previous, more secure, or more realistic generator.
setRandom
in interface ProbabilisticAlgorithm
public java.lang.Object next()
If a∈A(s) is the next action of the actions iterator and s∈S is the current state, this method will perform the state transition s→asʹ with probability τ(a)(s,sʹ).
next
in interface java.util.Iterator
public boolean hasNext()
hasNext
in interface java.util.Iterator
public void remove()
remove
in interface java.util.Iterator
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |