be.ac.ulg.montefiore.run.jahmm.io
Class OpdfReader<O extends Opdf<?>>

java.lang.Object
  extended by be.ac.ulg.montefiore.run.jahmm.io.OpdfReader<O>
Direct Known Subclasses:
OpdfGaussianMixtureReader, OpdfGaussianReader, OpdfGenericReader, OpdfIntegerReader, OpdfMultiGaussianReader

public abstract class OpdfReader<O extends Opdf<?>>
extends java.lang.Object

Reads an observation distribution textual description.


Constructor Summary
OpdfReader()
           
 
Method Summary
abstract  O read(java.io.StreamTokenizer st)
          Reads an Opdf out of a StreamTokenizer.
protected static double[] read(java.io.StreamTokenizer st, int length)
          Reads a sequence of numbers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpdfReader

public OpdfReader()
Method Detail

read

public abstract O read(java.io.StreamTokenizer st)
                                throws java.io.IOException,
                                       FileFormatException
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.

Parameters:
st - A stream tokenizer.
Returns:
An Opdf.
Throws:
java.io.IOException
FileFormatException

read

protected static double[] read(java.io.StreamTokenizer st,
                               int length)
                        throws java.io.IOException,
                               FileFormatException
Reads a sequence of numbers. The sequence is between brackets and numbers are separated by spaces. Empty array are not allowed.

Parameters:
st - The tokenizer to read the sequence from.
length - The expected length of the sequence or a strictly negative number if it must not be checked.
Returns:
The array read.
Throws:
java.io.IOException
FileFormatException


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