be.ac.ulg.montefiore.run.jahmm.toolbox
Class MarkovGenerator<O extends Observation>

java.lang.Object
  extended by be.ac.ulg.montefiore.run.jahmm.toolbox.MarkovGenerator<O>

public class MarkovGenerator<O extends Observation>
extends java.lang.Object

Generates sequences of markovian observations given a HMM.


Constructor Summary
MarkovGenerator(Hmm<O> hmm)
          Initializes a Markovian generator.
 
Method Summary
 void newSequence()
          Finds a new state according to the initial (pi) probabilities of each state.
 O observation()
          Generates a new (pseudo) random observation.
 java.util.List<O> observationSequence(int length)
          Generates a new (pseudo) random observation sequence and start a new one.
 int stateNb()
          Returns the state number of the current state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkovGenerator

public MarkovGenerator(Hmm<O> hmm)
Initializes a Markovian generator.

Parameters:
hmm - An Hidden Markov Model that perfectly models the sequences generated by this object.
Method Detail

observation

public O observation()
Generates a new (pseudo) random observation.

Returns:
The generated observation.

observationSequence

public java.util.List<O> observationSequence(int length)
Generates a new (pseudo) random observation sequence and start a new one.

Parameters:
length - The length of the sequence.
Returns:
An observation sequence.

newSequence

public void newSequence()
Finds a new state according to the initial (pi) probabilities of each state.


stateNb

public int stateNb()
Returns the state number of the current state.

Returns:
A state number.


Copyright © 2004,2005 Jean-Marc François.