T - the type of each positionpublic class PermutedSequence<T> extends Sequence.RecursiveSequence<T>
Sequence.CompositeSequence<T>, Sequence.RecursiveSequence<T>, Sequence.SubSequence<T>contentalphabetCon, annotation, rc| Constructor and Description |
|---|
PermutedSequence(Sequence<T> seq)
Creates a new
PermutedSequence by shuffling the symbols of a
given Sequence. |
PermutedSequence(Sequence<T> seq,
int[] permutation)
Creates a new
PermutedSequence for a given permutation |
| Modifier and Type | Method and Description |
|---|---|
protected PermutedSequence<T> |
flatCloneWithoutAnnotation()
Works in analogy to
Object.clone(), but does not clone the
annotation. |
protected int |
getIndex(int pos)
Returns the index in the internal sequence.
|
int |
getLength()
Returns the length of the
Sequence. |
addToRepresentation, compareTo, continuousVal, discreteVal, fillContainer, getEmptyContainer, getEmptyRepresentation, getStringRepresentation, hashCodeForPos, isMultiDimensionalannotate, 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, toStringpublic PermutedSequence(Sequence<T> seq) throws WrongAlphabetException
PermutedSequence by shuffling the symbols of a
given Sequence.seq - the initial sequenceWrongAlphabetException - if the AlphabetContainer is not simpleSequence.RecursiveSequence.Sequence.RecursiveSequence(de.jstacs.data.AlphabetContainer, de.jstacs.data.sequences.Sequence)public PermutedSequence(Sequence<T> seq, int[] permutation) throws WrongAlphabetException, Exception
PermutedSequence for a given permutationseq - the original sequencepermutation - the permutation of the sequenceWrongAlphabetException - if the AlphabetContainer is not simpleException - if the length of the permutation does not match that of the sequenceSequence.RecursiveSequence.Sequence.RecursiveSequence(de.jstacs.data.AlphabetContainer, de.jstacs.data.sequences.Sequence)protected int getIndex(int pos)
Sequence.RecursiveSequencegetIndex in class Sequence.RecursiveSequence<T>pos - the index in the external sequencepublic int getLength()
SequenceSequence.protected PermutedSequence<T> flatCloneWithoutAnnotation()
SequenceObject.clone(), but does not clone the
annotation. This method is used in
Sequence.annotate(boolean, SequenceAnnotation...).flatCloneWithoutAnnotation in class Sequence<T>Sequence without annotation