de.jstacs.data.sequences
Class DiscreteSequence

java.lang.Object
  extended by de.jstacs.data.Sequence<int[]>
      extended by de.jstacs.data.sequences.DiscreteSequence
All Implemented Interfaces:
Comparable<Sequence<int[]>>
Direct Known Subclasses:
MultiDimensionalDiscreteSequence, SimpleDiscreteSequence

public abstract class DiscreteSequence
extends Sequence<int[]>

This is the super class of discrete sequences.

Author:
Jens Keilwagen

Nested Class Summary
 
Nested classes/interfaces inherited from class de.jstacs.data.Sequence
Sequence.CompositeSequence<T>, Sequence.RecursiveSequence<T>, Sequence.SubSequence<T>
 
Field Summary
 
Fields inherited from class de.jstacs.data.Sequence
alphabetCon, annotation, rc
 
Constructor Summary
protected DiscreteSequence(AlphabetContainer container, SequenceAnnotation[] annotation)
          This constructor creates a new DiscreteSequence with the AlphabetContainer container and the annotation annotation but without the content.
 
Method Summary
 int compareTo(int[] t1, int[] t2)
          This method compares to container and is used in Sequence.compareTo(Sequence).
 
Methods inherited from class de.jstacs.data.Sequence
addToRepresentation, annotate, compareTo, complement, complement, continuousVal, create, create, create, discreteVal, equals, fillContainer, flatCloneWithoutAnnotation, getAlphabetContainer, getAnnotation, getCompositeSequence, getCompositeSequence, getEmptyContainer, getEmptyRepresentation, getHammingDistance, getLength, getNumberOfSequenceAnnotationsByType, getSequenceAnnotationByType, getSequenceAnnotationByTypeAndIdentifier, getStringRepresentation, getSubSequence, getSubSequence, getSubSequence, getSubSequence, hashCode, hashCodeForPos, isMultiDimensional, 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
 

Constructor Detail

DiscreteSequence

protected DiscreteSequence(AlphabetContainer container,
                           SequenceAnnotation[] annotation)
This constructor creates a new DiscreteSequence with the AlphabetContainer container and the annotation annotation but without the content. The content has to be set by the constructor of the subclass.

Parameters:
container - the AlphabetContainer of the sequence
annotation - the annotation of the sequence
See Also:
Sequence.Sequence(AlphabetContainer, SequenceAnnotation[])
Method Detail

compareTo

public int compareTo(int[] t1,
                     int[] t2)
Description copied from class: Sequence
This method compares to container and is used in Sequence.compareTo(Sequence).

Specified by:
compareTo in class Sequence<int[]>
Parameters:
t1 - the first container
t2 - the second container
Returns:
zero if arguments are equal
See Also:
Sequence.getEmptyContainer(), Sequence.fillContainer(Object, int), Comparable.compareTo(java.lang.Object)