Package phase
Class HmmUpdater
- java.lang.Object
-
- phase.HmmUpdater
-
public class HmmUpdater extends java.lang.Object
Instances of class
HmmUpdater
have methods for one-step updates of forward or backward HMM values.
-
-
Constructor Summary
Constructors Constructor Description HmmUpdater(float pErr)
Constructs a newHmmUpdater
instance from the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bwdUpdate(float[] bwd, float pSwitch, byte[] mismatch, int nStates)
Updates the backward values.float
fwdUpdate(float[] fwd, float sum, float pSwitch, byte[] mismatch, int nStates)
Updates the forward values and returns the sum of the updated forward values.
-
-
-
Method Detail
-
fwdUpdate
public float fwdUpdate(float[] fwd, float sum, float pSwitch, byte[] mismatch, int nStates)
Updates the forward values and returns the sum of the updated forward values.- Parameters:
fwd
- the array of forward values that will be updatedpSwitch
- the probability of jumping to a random statesum
- the sum of forward values in the specified arraymismatch
- the number of allele mismatches (0 or 1) for each HMM statenStates
- the number of states- Returns:
- the sum of the updated forward values
- Throws:
java.lang.IndexOutOfBoundsException
- iffwd.length < nStates || mismatch.length < nStates
java.lang.NullPointerException
- iffwd == null || mismatch == null
-
bwdUpdate
public void bwdUpdate(float[] bwd, float pSwitch, byte[] mismatch, int nStates)
Updates the backward values.- Parameters:
bwd
- the array of backward values that will be updatedpSwitch
- the probability of jumping to a random statemismatch
- the number of allele mismatches (0 or 1) for each HMM statenStates
- the number of states- Throws:
java.lang.IndexOutOfBoundsException
- ifbwd.length < nStates || mismatch.length < nStates
java.lang.NullPointerException
- ifbwd == null || mismatch == null
-
-