public class DiscreteAlphabetMapping extends Object implements Storable
DiscreteAlphabet.| Constructor and Description |
|---|
DiscreteAlphabetMapping(int[] newValues,
DiscreteAlphabet newAlphabet)
The main constructor creating a
DiscreteAlphabetMapping. |
DiscreteAlphabetMapping(StringBuffer xml)
The standard constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
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. |
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 Alphabetpublic DiscreteAlphabetMapping(StringBuffer xml) throws NonParsableException
Storable.
Creates a new DiscreteAlphabetMapping out of its XML representation.xml - the XML representation as StringBufferNonParsableException - if the DiscreteAlphabetMapping could not be reconstructed
out of the XML representation (the StringBuffer could
not be parsed)Storablepublic StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.public DiscreteAlphabet getNewAlphabet()
public int getNewDiscreteValue(int oldValue)
oldValue - the old valuepublic double getLogNumberOfSimilarSymbols(int oldValue)
oldValue - the old valueMappedDiscreteSequence.getLogNumberOfPossibleOriginalSequences()