|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.data.alphabets.DiscreteAlphabetMapping
public class DiscreteAlphabetMapping
This class implements the transformation of discrete values to other discrete values
which define a DiscreteAlphabet
.
Constructor Summary | |
---|---|
DiscreteAlphabetMapping(int[] newValues,
DiscreteAlphabet newAlphabet)
The main constructor creating a DiscreteAlphabetMapping . |
|
DiscreteAlphabetMapping(StringBuffer xml)
The standard constructor for the interface Storable . |
Method Summary | |
---|---|
double |
getLogNumberOfSimilarSymbols(int oldValue)
This method returns the logarithm of the number of old values that yield the same new value. |
DiscreteAlphabet |
getNewAlphabet()
Returns the new Alphabet that is used for mapping. |
int |
getNewDiscreteValue(int oldValue)
This method implements the main transformation of the values. |
StringBuffer |
toXML()
This method returns an XML representation as StringBuffer of an
instance of the implementing class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiscreteAlphabetMapping(int[] newValues, DiscreteAlphabet newAlphabet)
DiscreteAlphabetMapping
.
newValues
- the assignment of the old value (index) to the new value (entry of the array)newAlphabet
- the new Alphabet
public DiscreteAlphabetMapping(StringBuffer xml) throws NonParsableException
Storable
.
Creates a new DiscreteAlphabetMapping
out of its XML representation.
xml
- the XML representation as StringBuffer
NonParsableException
- if the DiscreteAlphabetMapping
could not be reconstructed
out of the XML representation (the StringBuffer
could
not be parsed)Storable
Method Detail |
---|
public StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.
toXML
in interface Storable
public DiscreteAlphabet getNewAlphabet()
public int getNewDiscreteValue(int oldValue)
oldValue
- the old value
public double getLogNumberOfSimilarSymbols(int oldValue)
oldValue
- the old value
MappedDiscreteSequence.getLogNumberOfPossibleOriginalSequences()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |