|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.sequenceScores.statisticalModels.trainable.discrete.Constraint
de.jstacs.sequenceScores.statisticalModels.trainable.discrete.inhomogeneous.InhConstraint
public abstract class InhConstraint
This class is the superclass for all inhomogeneous constraints.
Field Summary | |
---|---|
protected int[] |
offset
This array is used to find the start indices of the conditional distributions. |
Fields inherited from class de.jstacs.sequenceScores.statisticalModels.trainable.discrete.Constraint |
---|
counts, freq, usedPositions |
Constructor Summary | |
---|---|
protected |
InhConstraint(int[] pos,
int[] alphabetLength)
Creates a new InhConstraint instance. |
protected |
InhConstraint(StringBuffer xml)
The standard constructor for the interface Storable . |
Method Summary | |
---|---|
protected void |
appendAdditionalInfo(StringBuffer xml)
This method appends additional information that is not stored in the base class to the StringBuffer . |
InhConstraint |
clone()
|
protected void |
extractAdditionalInfo(StringBuffer xml)
This method parses additional information from the StringBuffer
that is not parsed in the base class. |
String |
getDescription(AlphabetContainer con,
int i)
Returns the decoded symbol for the encoded symbol i . |
int |
satisfiesSpecificConstraint(Sequence s,
int start)
This method returns the index of the specific constraint that is fulfilled by the Sequence seq beginning at position
start . |
Methods inherited from class de.jstacs.sequenceScores.statisticalModels.trainable.discrete.Constraint |
---|
add, add, estimate, estimateUnConditional, getCount, getFreq, getFreq, getFreqInfo, getMarginalOrder, getNumberOfSpecificConstraints, getPosition, getPositions, getXMLTag, reset, resetCounts, toString, toXML |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int[] offset
Constructor Detail |
---|
protected InhConstraint(int[] pos, int[] alphabetLength)
InhConstraint
instance.
pos
- the positionsalphabetLength
- the length of each alphabet (not only the used positions)Constraint.Constraint(int[], int)
protected InhConstraint(StringBuffer xml) throws NonParsableException
Storable
.
Creates a new InhConstraint
instance out of its XML
representation.
xml
- the XML representation as StringBuffer
NonParsableException
- if the InhConstraint
instance could not be
reconstructed out of the XML representation (the
StringBuffer
could not be parsed)Storable
,
Constraint.Constraint(StringBuffer)
Method Detail |
---|
protected void extractAdditionalInfo(StringBuffer xml) throws NonParsableException
Constraint
StringBuffer
that is not parsed in the base class.
extractAdditionalInfo
in class Constraint
xml
- the StringBuffer
to be parsed
NonParsableException
- if something with the parsing went wrongpublic InhConstraint clone() throws CloneNotSupportedException
clone
in class Constraint
CloneNotSupportedException
public int satisfiesSpecificConstraint(Sequence s, int start)
Constraint
Sequence
seq
beginning at position
start
.
satisfiesSpecificConstraint
in class Constraint
s
- the sequencestart
- the start position
protected void appendAdditionalInfo(StringBuffer xml)
Constraint
StringBuffer
.
appendAdditionalInfo
in class Constraint
xml
- the StringBuffer
that is used for appending additional
informationpublic String getDescription(AlphabetContainer con, int i)
Constraint
i
.
getDescription
in class Constraint
con
- the AlphabetContainer
i
- the encoded symbol
i
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |