aima.probability
Class RandomVariable
java.lang.Object
aima.probability.RandomVariable
public class RandomVariable
- extends java.lang.Object
Constructor Summary |
RandomVariable(java.util.List<java.lang.String> states)
|
RandomVariable(java.lang.String name,
java.util.List<java.lang.String> states)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RandomVariable
public RandomVariable(java.util.List<java.lang.String> states)
RandomVariable
public RandomVariable(java.lang.String name,
java.util.List<java.lang.String> states)
setProbabilityOf
public void setProbabilityOf(java.lang.String state,
java.lang.Double probability)
getProbabilityOf
public double getProbabilityOf(java.lang.String state)
states
public java.util.List<java.lang.String> states()
duplicate
public RandomVariable duplicate()
normalize
public void normalize()
asMatrix
public Matrix asMatrix()
updateFrom
public void updateFrom(Matrix aMatrix)
createUnitBelief
public RandomVariable createUnitBelief()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toParticleSet
public ParticleSet toParticleSet(HiddenMarkovModel hmm,
Randomizer randomizer,
int numberOfParticles)