|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.data.sequences.Sequence<int[]>
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 DiscreteAlphabetMapping
s.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.jstacs.data.sequences.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 DiscreteAlphabetMapping s used for mapping the original Sequence . |
Fields inherited from class de.jstacs.data.sequences.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 DiscreteAlphabetMapping s. |
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 MappedDiscreteSequence |
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 Sequence s that yield the same mapped Sequence . |
double |
getLogNumberOfPossibleOriginalSequences(int start,
int end)
This method returns the logarithm of the number of original Sequence s 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 DiscreteAlphabetMapping s. |
Methods inherited from class de.jstacs.data.sequences.SimpleDiscreteSequence |
---|
addToRepresentation, compareTo, continuousVal, getEmptyRepresentation, getStringRepresentation, hashCodeForPos, isMultiDimensional |
Methods inherited from class de.jstacs.data.sequences.Sequence |
---|
annotate, compareTo, complement, complement, create, create, create, equals, getAlphabetContainer, getAnnotation, getCompositeSequence, getCompositeSequence, getHammingDistance, getNumberOfSequenceAnnotationsByType, getSequenceAnnotationByType, getSequenceAnnotationByTypeAndIdentifier, getSubSequence, getSubSequence, getSubSequence, getSubSequence, hashCode, matches, reverse, reverse, reverseComplement, reverseComplement, toDiscrete, toString, toString, toString, toString |
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
DiscreteAlphabetMapping
s 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 AlphabetContainer
seqAn
- the SequenceAnnotation
s for the MappedDiscreteSequence
transformation
- 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 DiscreteAlphabetMapping
s.
original
- the original Sequence
transformation
- 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 DiscreteAlphabetMapping
s.
original
- the original AlphabetContainer
transformation
- the DiscreteAlphabetMapping
s defining the mapping
AlphabetContainer
public int discreteVal(int pos)
Sequence
pos
of the
Sequence
.
discreteVal
in class Sequence<int[]>
pos
- the position of the Sequence
pos
of the
Sequence
protected MappedDiscreteSequence flatCloneWithoutAnnotation()
Sequence
Object.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()
Sequence
Sequence
.
getLength
in class Sequence<int[]>
Sequence
public double getLogNumberOfPossibleOriginalSequences()
Sequence
s that yield the same mapped Sequence
.
Sequence
s that yield the same mapped Sequence
public double getLogNumberOfPossibleOriginalSequences(int start, int end)
Sequence
s that yield the same mapped Sequence
.
start
- the start position (inclusive)end
- the end position (exclusive)
Sequence
s that yield the same mapped Sequence
public final int[] getEmptyContainer()
Sequence
getEmptyContainer
in class SimpleDiscreteSequence
Sequence.fillContainer(Object, int)
,
Sequence.isMultiDimensional()
public final void fillContainer(int[] container, int pos)
Sequence
fillContainer
in class SimpleDiscreteSequence
container
- the container which is used for filling the content.pos
- the positionSequence.getEmptyContainer()
,
Sequence.isMultiDimensional()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |