|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLikelihood.Likelihood.NodeLikelihood
public static class Likelihood.NodeLikelihood
Stores the results of a likelihood claculation for a single node in a tree. That is the partial likelihoods for each possible state. This is one of only two classes where backwards compitability with 1.1 is not possible. The previous constructor only contained information on the states and not what position they mapped too. The new, more efficient data structures need to knoiw the mapping so there's no way the old constructor is usable.
Constructor Summary | |
---|---|
Likelihood.NodeLikelihood(ArrayMap<java.lang.String,java.lang.Integer> states,
java.util.Set<java.lang.String> allowedStates)
Default constructor |
Method Summary | |
---|---|
Likelihood.NodeLikelihood |
clone()
|
double |
getLikelihood(int i)
Returns the partial likelihood for the state at position i. |
double |
getLikelihood(java.lang.String state)
Returns the partial likelihood for a given state |
double[] |
getLikelihoods()
Returns the partial likelihood for each state as an array. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Likelihood.NodeLikelihood(ArrayMap<java.lang.String,java.lang.Integer> states, java.util.Set<java.lang.String> allowedStates)
states
- Map from a state to it's position in the arrayallowedStates
- The allowed states at this stateMethod Detail |
---|
public Likelihood.NodeLikelihood clone()
clone
in class java.lang.Object
public double getLikelihood(java.lang.String state) throws Likelihood.LikelihoodException
state
- The state to return the partial likelihood for
Likelihood.LikelihoodException
- Thrown if no likelihood
has been calculated for the given statepublic double getLikelihood(int i)
i
- The position
public double[] getLikelihoods()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |