statalign.base.hmm
Class HmmSilent
java.lang.Object
statalign.base.hmm.Hmm
statalign.base.hmm.HmmSilent
- Direct Known Subclasses:
- HmmNonParam
public abstract class HmmSilent
- extends Hmm
This is the abstract class of pair-HMMs that emit characters into one unobservable
sequence, namely that aligns two observable sequences via an unobservable
ancestral sequence.
- Author:
- novak
Fields inherited from class statalign.base.hmm.Hmm |
params |
Method Summary |
abstract int |
getSilent()
Returns the index of the silent state. |
abstract double[][] |
preCalcRedTransMatrix(double[][] redTransMatrix,
double[][] transMatrix)
Silent state elimination. |
abstract double[][] |
preCalcTransMatrix(double[][] transMatrix,
double t1,
double t2)
Calculates the transition matrix given edge lengths t1 and t2 of a cherry-motif. |
void |
updateParam(double[] _P)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HmmSilent
public HmmSilent()
preCalcTransMatrix
public abstract double[][] preCalcTransMatrix(double[][] transMatrix,
double t1,
double t2)
- Calculates the transition matrix given edge lengths t1 and t2 of a cherry-motif.
- Parameters:
transMatrix
- If null, the function allocates memory for the return matrix
If not, this is used for storing the matrix. For speeding-up purposes,
note that allocating memory is time-consuming. In this way we need to allocate
memory when asked.t1
- The length of the left edget2
- The length of the right edge.
- Returns:
- The calculated transition matrix.
preCalcRedTransMatrix
public abstract double[][] preCalcRedTransMatrix(double[][] redTransMatrix,
double[][] transMatrix)
- Silent state elimination.
Transforms transMatrix into the transition matrix obtained by eliminating the
silent state of transMatrix.
- Parameters:
redTransMatrix
- Array to store the results, may be left nulltransMatrix
- Input transition matrix with a silent state
- Returns:
- The calculated ('reduced') transition matrix (redTransMatrix or a newly
allocated array if it is null)
getSilent
public abstract int getSilent()
- Returns the index of the silent state.
- Returns:
- Index of the silent state
updateParam
public void updateParam(double[] _P)