public class RandomWalker<T extends SequenceElement> extends java.lang.Object implements GraphWalker<T>
Modifier and Type | Class and Description |
---|---|
static class |
RandomWalker.Builder<T extends SequenceElement> |
Modifier and Type | Field and Description |
---|---|
protected double |
alpha |
protected NoEdgeHandling |
noEdgeHandling |
protected int[] |
order |
protected java.util.concurrent.atomic.AtomicInteger |
position |
protected java.util.Random |
rng |
protected long |
seed |
protected IGraph<T,?> |
sourceGraph |
protected WalkDirection |
walkDirection |
protected int |
walkLength |
Modifier | Constructor and Description |
---|---|
protected |
RandomWalker() |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
This method checks, if walker has any more sequences left in queue
|
boolean |
isLabelEnabled() |
Sequence<T> |
next()
This method returns next walk sequence from this graph
|
void |
reset(boolean shuffle)
This method resets walker
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSourceGraph
protected int walkLength
protected NoEdgeHandling noEdgeHandling
protected IGraph<T extends SequenceElement,?> sourceGraph
protected java.util.concurrent.atomic.AtomicInteger position
protected java.util.Random rng
protected long seed
protected int[] order
protected WalkDirection walkDirection
protected double alpha
public boolean hasNext()
hasNext
in interface GraphWalker<T extends SequenceElement>
public boolean isLabelEnabled()
isLabelEnabled
in interface GraphWalker<T extends SequenceElement>
public Sequence<T> next()
next
in interface GraphWalker<T extends SequenceElement>
public void reset(boolean shuffle)
reset
in interface GraphWalker<T extends SequenceElement>
shuffle
- if TRUE, order of walks will be shuffled