public class SimpleDifferentiableState extends SimpleState implements DifferentiableState
State
based on Emission
that allows to reuse Emission
s for different State
s.e, forward, name
Constructor and Description |
---|
SimpleDifferentiableState(DifferentiableEmission e,
String name,
boolean forward)
This is the constructor of a
SimpleState . |
Modifier and Type | Method and Description |
---|---|
double |
getLogScoreAndPartialDerivation(int startPos,
int endPos,
IntList indices,
DoubleList partDer,
Sequence seq)
This method allows to compute the logarithm of the score and the gradient for the given subsequences.
|
addToStatistic, getGraphvizNodeOptions, getLogScoreFor, getName, isSilent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGraphvizNodeOptions, getLogScoreFor, isSilent, toString
public SimpleDifferentiableState(DifferentiableEmission e, String name, boolean forward)
SimpleState
.e
- the emission that is internally used for scoring subsequencesname
- the name of the stateforward
- a switch that decides whether to use the forward or the reverse complementary strand of a sequencepublic double getLogScoreAndPartialDerivation(int startPos, int endPos, IntList indices, DoubleList partDer, Sequence seq) throws WrongLengthException, OperationNotSupportedException
DifferentiableState
getLogScoreAndPartialDerivation
in interface DifferentiableState
startPos
- the start position (inclusive)endPos
- the end position (inclusive)indices
- a list for the parameter indicespartDer
- a list for the partial derivationsseq
- the Sequence
(s)WrongLengthException
- if the length can not be modeledOperationNotSupportedException
- if the reverse complement of the sequence can not be computed