be.ac.ulg.montefiore.run.jahmm.io
Class OpdfMultiGaussianReader

java.lang.Object
  extended by be.ac.ulg.montefiore.run.jahmm.io.OpdfReader<OpdfMultiGaussian>
      extended by be.ac.ulg.montefiore.run.jahmm.io.OpdfMultiGaussianReader

public class OpdfMultiGaussianReader
extends OpdfReader<OpdfMultiGaussian>

This class implements a OpdfMultiGaussian reader. The syntax of the distribution description is the following.

The description always begins with the keyword MultiGaussianOPDF. The next (resp. last) symbol is an opening (resp. closing) bracket. Between the backets are two series of numbers between brackets and separated by a space.

The first describes the distribution's mean vector; each number is the corresponding vector element, from top to bottom.

The second describes the covariance matrix; it is given line by line, from top to bottom. Each line is represented by the values of its elements, from left to right, separated by a space and between brackets.

For example, reading
MultiGaussianOPDF [ [ 5. 5. ] [ [ 1.2 .3 ] [ .3 4. ] ] ] returns a distribution equivalent to
new OpdfMultiGaussian(new double[] { 5., 5. }, new double[][] { { 1.2, .3 }, { .3, 4. } }).


Constructor Summary
OpdfMultiGaussianReader()
           
 
Method Summary
 OpdfMultiGaussian read(java.io.StreamTokenizer st)
          Reads an Opdf out of a StreamTokenizer.
 
Methods inherited from class be.ac.ulg.montefiore.run.jahmm.io.OpdfReader
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpdfMultiGaussianReader

public OpdfMultiGaussianReader()
Method Detail

read

public OpdfMultiGaussian read(java.io.StreamTokenizer st)
                       throws java.io.IOException,
                              FileFormatException
Description copied from class: OpdfReader
Reads an Opdf out of a StreamTokenizer.

The stream tokenizer syntax table must be set according to of HmmReader.initSyntaxTable(StreamTokenizer) before the call to this method and reset to this state if modified before it returns.

Specified by:
read in class OpdfReader<OpdfMultiGaussian>
Parameters:
st - A stream tokenizer.
Returns:
An Opdf.
Throws:
java.io.IOException
FileFormatException


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