de.jstacs.data
Class DiscreteSequenceEnumerator
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Sequenceslength - the length of the discrete Sequencessparse - indicates if the enumerator delivers only sequences for which
the reverse complement has not been returned before
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