|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.models.discrete.Constraint
de.jstacs.models.discrete.inhomogeneous.InhConstraint
de.jstacs.models.discrete.inhomogeneous.MEMConstraint
public class MEMConstraint
The constraint can be used for any MEM application.
| Field Summary |
|---|
| Fields inherited from class de.jstacs.models.discrete.inhomogeneous.InhConstraint |
|---|
offset |
| Fields inherited from class de.jstacs.models.discrete.Constraint |
|---|
counts, freq, usedPositions |
| Constructor Summary | |
|---|---|
MEMConstraint(int[] pos,
int[] alphabetLength)
Creates a MEMConstraint as part of a (whole) model |
|
MEMConstraint(int[] pos,
int[] alphabetLength,
int[] corrected_positions)
Creates a MEMConstraint as part of a model |
|
MEMConstraint(StringBuffer xml)
Creates a MEMConstraint from a StringBuffer |
|
| Method Summary | |
|---|---|
protected void |
appendAdditionalInfo(StringBuffer xml)
This method appends additional information that are not stored in the base class to the StringBuffer. |
MEMConstraint |
clone()
|
void |
estimate(double ess)
Estimates the (smoothed) relative frequencies using the ess. |
protected void |
extractAdditionalInfo(StringBuffer xml)
This method parses additional information from the StringBuffer that are not parsed in the base class. |
int |
getCorrectedPosition(int index)
Returns the value of the corrected position |
double |
getExpLambda(int index)
Returns \exp(\lambda_{index}). |
double |
getFreq(int index)
Returns the current frequency with index index |
double |
getLambda(int index)
Returns \lambda_{index}. |
protected String |
getXMLTag()
Returns the XML-tag that is used for the class to en- or decode. |
void |
multiplyExpLambdaWith(int index,
double val)
Multiplies \exp(\lambda_{index}) with val |
void |
reset()
This method resets all member variables the are in someway counters, frequencies, ... |
int |
satisfiesSpecificConstraint(SequenceIterator sequence)
Returns the index of that constraint that is satiesfied by sequence |
void |
setExpLambda(int index,
double val)
Sets the value of exp(\lambda_{index}) |
void |
setLambda(int index,
double val)
Sets the value of \lambda_{index} |
String |
toString()
|
| Methods inherited from class de.jstacs.models.discrete.inhomogeneous.InhConstraint |
|---|
satisfiesSpecificConstraint |
| Methods inherited from class de.jstacs.models.discrete.Constraint |
|---|
add, add, estimateUnConditional, getCount, getFreq, getMarginalOrder, getNumberOfSpecificConstraints, getPosition, getPositions, toXML |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MEMConstraint(int[] pos,
int[] alphabetLength)
throws IllegalArgumentException
pos - the used positions (have to be sorted)alphabetLength - an array containing the length of the the alphabet for each position (of the whole model)
IllegalArgumentException - if pos is not sorted
public MEMConstraint(int[] pos,
int[] alphabetLength,
int[] corrected_positions)
throws IllegalArgumentException
pos - the used positions (have to be sorted)alphabetLength - an array containing the length of the the alphabet for each position (of the whole model)corrected_positions - an array containing the corrected positions
IllegalArgumentException - if pos is not sorted or pos.length!=corrected_positions.length
public MEMConstraint(StringBuffer xml)
throws NonParsableException
xml - the buffer
NonParsableException - if the buffer is not parsable| Method Detail |
|---|
public MEMConstraint clone()
throws CloneNotSupportedException
clone in class InhConstraintCloneNotSupportedExceptionpublic void estimate(double ess)
Constraint
estimate in class Constraintess - the ESSpublic int getCorrectedPosition(int index)
index -
public double getExpLambda(int index)
index - the index
public double getLambda(int index)
index - the index
public void multiplyExpLambdaWith(int index,
double val)
val
index - the indexval - the factor/valuepublic void reset()
Constraint
reset in class Constraintpublic int satisfiesSpecificConstraint(SequenceIterator sequence)
sequence
sequence - the SequenceIterator
public double getFreq(int index)
Constraintindex
getFreq in class Constraintindex - the index
public void setExpLambda(int index,
double val)
index - the indexval - the value
public void setLambda(int index,
double val)
index - the indexval - the valuepublic String toString()
toString in class Constraintprotected void appendAdditionalInfo(StringBuffer xml)
Constraint
appendAdditionalInfo in class InhConstraintxml - the StringBuffer that is used for appending additional informationprotected String getXMLTag()
Constraint
getXMLTag in class Constraint
protected void extractAdditionalInfo(StringBuffer xml)
throws NonParsableException
Constraint
extractAdditionalInfo in class InhConstraintxml - the StringBuffer to parse
NonParsableException - if something with the parsing went wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||