|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.sequenceScores.statisticalModels.trainable.discrete.inhomogeneous.SequenceIterator
public class SequenceIterator
This class is used to iterate over a discrete sequence.
Constructor Summary | |
---|---|
SequenceIterator(int length)
Creates a new SequenceIterator with maximal length . |
Method Summary | |
---|---|
SequenceIterator |
clone()
|
int |
discreteValAt(int pos)
This method returns the discrete value for a specific position. |
int |
getNumberOfSequences()
This method returns the number of sequences in this iterator, i.e., the number of times next() returns true after using reset() . |
boolean |
next()
Changes the internal sequence representation to the next sequence. |
void |
reset()
Resets the internal sequence representation. |
void |
setBounds(int[] bounds)
This method sets the bounds for each position. |
boolean |
skip(int firstPos)
This method skips some position. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequenceIterator(int length)
SequenceIterator
with maximal length
.
length
- the maximal length of the sequenceMethod Detail |
---|
public SequenceIterator clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public boolean next()
true
if the new sequence is correct, otherwise
false
public void reset()
SequenceIterator
starts again.
public void setBounds(int[] bounds)
bounds.length
<= length
. This has to be ensured by the user.
bounds
- the array with bounds for each positionpublic boolean skip(int firstPos)
firstPos
- the first position that is interesting
true
if the internal sequence is from the scope,
false
otherwisepublic int discreteValAt(int pos)
pos
- the position
public int getNumberOfSequences()
next()
returns true
after using reset()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |