de.jstacs.data
Class DiscreteSequenceEnumerator

java.lang.Object
  extended by de.jstacs.data.DiscreteSequenceEnumerator
All Implemented Interfaces:
RecyclableSequenceEnumerator, Enumeration<Sequence>

public class DiscreteSequenceEnumerator
extends Object
implements RecyclableSequenceEnumerator

This class enumerates over all Sequences of a specific AlphabetContainer and length.

Author:
Jens Keilwagen

Constructor Summary
DiscreteSequenceEnumerator(AlphabetContainer con, int length, boolean sparse)
          Creates a new DiscreteSequenceEnumerator from a given AlphabetContainer and a length.
 
Method Summary
 boolean hasMoreElements()
           
 Sequence<int[]> nextElement()
           
 void reset()
          This method enables the user to reuse this enumerator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscreteSequenceEnumerator

public DiscreteSequenceEnumerator(AlphabetContainer con,
                                  int length,
                                  boolean sparse)
Creates a new DiscreteSequenceEnumerator from a given AlphabetContainer and a length. sparse determines, if the enumerator delivers only Sequences for which the reverse complement has not been returned before

Parameters:
con - the AlphabetContainer for the discrete Sequences
length - the length of the discrete Sequences
sparse - indicates if the enumerator delivers only sequences for which the reverse complement has not been returned before
Method Detail

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface Enumeration<Sequence>

nextElement

public Sequence<int[]> nextElement()
Specified by:
nextElement in interface Enumeration<Sequence>

reset

public void reset()
Description copied from interface: RecyclableSequenceEnumerator
This method enables the user to reuse this enumerator.

Specified by:
reset in interface RecyclableSequenceEnumerator