|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.data.Sequence<int[]>
de.jstacs.data.sequences.DiscreteSequence
de.jstacs.data.sequences.SimpleDiscreteSequence
de.jstacs.data.sequences.MappedDiscreteSequence
public class MappedDiscreteSequence
This class allows to map a discrete Sequence to an new Sequence using some DiscreteAlphabetMappings.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class de.jstacs.data.Sequence |
|---|
Sequence.CompositeSequence<T>, Sequence.RecursiveSequence<T>, Sequence.SubSequence<T> |
| Field Summary | |
|---|---|
protected SimpleDiscreteSequence |
original
The original Sequence. |
protected AlphabetContainer |
originalAlphabetContainer
The original AlphabetContainer. |
protected DiscreteAlphabetMapping[] |
transformation
The DiscreteAlphabetMappings used for mapping the original Sequence. |
| Fields inherited from class de.jstacs.data.Sequence |
|---|
alphabetCon, annotation, rc |
| Constructor Summary | |
|---|---|
protected |
MappedDiscreteSequence(AlphabetContainer originalAlphabetContainer,
SequenceAnnotation[] seqAn,
DiscreteAlphabetMapping... transformation)
This method allows to create an empty MappedDiscreteSequence. |
|
MappedDiscreteSequence(SimpleDiscreteSequence original,
DiscreteAlphabetMapping... transformation)
This method allows to create a MappedDiscreteSequence from a given Sequence and some given DiscreteAlphabetMappings. |
| Method Summary | |
|---|---|
int |
discreteVal(int pos)
Returns the discrete value at position pos of the
Sequence. |
void |
fillContainer(int[] container,
int pos)
The method fills the content of a specific position in to the container. |
protected Sequence |
flatCloneWithoutAnnotation()
Works in analogy to Object.clone(), but does not clone the
annotation. |
int[] |
getEmptyContainer()
The method returns a container that can be used for accessing the symbols for each position. |
int |
getLength()
Returns the length of the Sequence. |
double |
getLogNumberOfPossibleOriginalSequences()
This method returns the logarithm of the number of original Sequences that yield the same mapped Sequence. |
double |
getLogNumberOfPossibleOriginalSequences(int start,
int end)
This method returns the logarithm of the number of original Sequences that yield the same mapped Sequence. |
static AlphabetContainer |
getNewAlphabetContainer(AlphabetContainer original,
DiscreteAlphabetMapping... transformation)
This method allows to create a new AlphabetContainer given an old AlphabetContainer and some DiscreteAlphabetMappings. |
| Methods inherited from class de.jstacs.data.sequences.SimpleDiscreteSequence |
|---|
addToRepresentation, continuousVal, getEmptyRepresentation, getStringRepresentation, hashCodeForPos, isMultiDimensional |
| Methods inherited from class de.jstacs.data.sequences.DiscreteSequence |
|---|
compareTo |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected SimpleDiscreteSequence original
Sequence.
protected AlphabetContainer originalAlphabetContainer
AlphabetContainer.
protected DiscreteAlphabetMapping[] transformation
DiscreteAlphabetMappings used for mapping the original Sequence.
| Constructor Detail |
|---|
protected MappedDiscreteSequence(AlphabetContainer originalAlphabetContainer,
SequenceAnnotation[] seqAn,
DiscreteAlphabetMapping... transformation)
throws WrongAlphabetException
MappedDiscreteSequence. That is a MappedDiscreteSequence that contains no original Sequence.
originalAlphabetContainer - the original AlphabetContainerseqAn - the SequenceAnnotations for the MappedDiscreteSequencetransformation - the DiscreteAlphabetMapping defining the mapping
WrongAlphabetException - if the mapped AlphabetContainer is not discrete (should never happen)
public MappedDiscreteSequence(SimpleDiscreteSequence original,
DiscreteAlphabetMapping... transformation)
throws WrongAlphabetException
MappedDiscreteSequence from a given Sequence and some given DiscreteAlphabetMappings.
original - the original Sequencetransformation - the DiscreteAlphabetMapping defining the mapping
WrongAlphabetException - if the mapped AlphabetContainer is not discrete (should never happen)| Method Detail |
|---|
public static final AlphabetContainer getNewAlphabetContainer(AlphabetContainer original,
DiscreteAlphabetMapping... transformation)
AlphabetContainer given an old AlphabetContainer and some DiscreteAlphabetMappings.
original - the original AlphabetContainertransformation - the DiscreteAlphabetMappings defining the mapping
AlphabetContainerpublic int discreteVal(int pos)
Sequencepos of the
Sequence.
discreteVal in class Sequence<int[]>pos - the position of the Sequence
pos of the
Sequenceprotected Sequence flatCloneWithoutAnnotation()
SequenceObject.clone(), but does not clone the
annotation. This method is used in
Sequence.annotate(boolean, SequenceAnnotation...).
flatCloneWithoutAnnotation in class Sequence<int[]>Sequence without annotationpublic int getLength()
SequenceSequence.
getLength in class Sequence<int[]>Sequencepublic double getLogNumberOfPossibleOriginalSequences()
Sequences that yield the same mapped Sequence.
Sequences that yield the same mapped Sequence
public double getLogNumberOfPossibleOriginalSequences(int start,
int end)
Sequences that yield the same mapped Sequence.
start - the start position (inclusive)end - the end position (exclusive)
Sequences that yield the same mapped Sequencepublic final int[] getEmptyContainer()
Sequence
getEmptyContainer in class SimpleDiscreteSequenceSequence.fillContainer(Object, int),
Sequence.isMultiDimensional()
public final void fillContainer(int[] container,
int pos)
Sequence
fillContainer in class SimpleDiscreteSequencecontainer - the container which is used for filling the content.pos - the positionSequence.getEmptyContainer(),
Sequence.isMultiDimensional()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||