public class NearestVertexWalker<V extends SequenceElement> extends java.lang.Object implements GraphWalker<V>
Modifier and Type | Class and Description |
---|---|
static class |
NearestVertexWalker.Builder<V extends SequenceElement> |
protected class |
NearestVertexWalker.VertexComparator<V extends SequenceElement,E extends java.lang.Number> |
Modifier and Type | Field and Description |
---|---|
protected int |
depth |
protected int[] |
order |
protected java.util.Random |
rng |
protected SamplingMode |
samplingMode |
protected long |
seed |
protected IGraph<V,?> |
sourceGraph |
protected int |
walkLength |
Modifier | Constructor and Description |
---|---|
protected |
NearestVertexWalker() |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
This method checks, if walker has any more sequences left in queue
|
boolean |
isLabelEnabled() |
Sequence<V> |
next()
This method returns next walk sequence from this graph
|
void |
reset(boolean shuffle)
This method resets walker
|
protected Sequence<V> |
walk(Vertex<V> node,
int cDepth) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSourceGraph
protected IGraph<V extends SequenceElement,?> sourceGraph
protected int walkLength
protected long seed
protected SamplingMode samplingMode
protected int[] order
protected java.util.Random rng
protected int depth
public boolean hasNext()
GraphWalker
hasNext
in interface GraphWalker<V extends SequenceElement>
public Sequence<V> next()
GraphWalker
next
in interface GraphWalker<V extends SequenceElement>
public void reset(boolean shuffle)
GraphWalker
reset
in interface GraphWalker<V extends SequenceElement>
shuffle
- if TRUE, order of walks will be shuffledpublic boolean isLabelEnabled()
isLabelEnabled
in interface GraphWalker<V extends SequenceElement>