jflexcrf
Class Viterbi

java.lang.Object
  extended by jflexcrf.Viterbi

public class Viterbi
extends java.lang.Object

The Class Viterbi.


Nested Class Summary
 class Viterbi.PairDblInt
          The Class PairDblInt.
 
Field Summary
 Viterbi.PairDblInt[][] memory
          The memory.
 int memorySize
          The memory size.
 Model model
          The model.
 
Constructor Summary
Viterbi()
          Instantiates a new viterbi.
 
Method Summary
 void allocateMemory(int memorySize)
          Allocate memory.
 void computeMi()
          Compute mi.
 void computeVi(java.util.List seq, int pos, DoubleVector Vi, boolean isExp)
          Compute vi.
 void divide(Viterbi.PairDblInt[] cols, double val)
          Divide.
 int findMax(Viterbi.PairDblInt[] cols)
          Find max.
 void init(Model model)
          Inits the.
 double sum(Viterbi.PairDblInt[] cols)
          Sum.
 void viterbiInference(java.util.List seq)
          Viterbi inference.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

public Model model
The model.


memorySize

public int memorySize
The memory size.


memory

public Viterbi.PairDblInt[][] memory
The memory.

Constructor Detail

Viterbi

public Viterbi()
Instantiates a new viterbi.

Method Detail

init

public void init(Model model)
Inits the.

Parameters:
model - the model

allocateMemory

public void allocateMemory(int memorySize)
Allocate memory.

Parameters:
memorySize - the memory size

computeMi

public void computeMi()
Compute mi.


computeVi

public void computeVi(java.util.List seq,
                      int pos,
                      DoubleVector Vi,
                      boolean isExp)
Compute vi.

Parameters:
seq - the seq
pos - the pos
Vi - the vi
isExp - the is exp

sum

public double sum(Viterbi.PairDblInt[] cols)
Sum.

Parameters:
cols - the cols
Returns:
the double

divide

public void divide(Viterbi.PairDblInt[] cols,
                   double val)
Divide.

Parameters:
cols - the cols
val - the val

findMax

public int findMax(Viterbi.PairDblInt[] cols)
Find max.

Parameters:
cols - the cols
Returns:
the int

viterbiInference

public void viterbiInference(java.util.List seq)
Viterbi inference.

Parameters:
seq - the seq