public interface Traversal
Modifier and Type | Interface and Description |
---|---|
static class |
Traversal.Direction |
Modifier and Type | Method and Description |
---|---|
Traversal |
backward(java.util.function.Consumer<PgxVertex> backward)
Visit the vertex in the backward direction of the traversal.
|
Traversal |
backwardFilter(java.util.function.Predicate<PgxVertex> filter)
Filter the vertices in the BFS/DFS traversal when going backward.
|
static int |
currentLevel()
Get the current level of the BFS/DFS traversal.
|
Traversal |
direction(Traversal.Direction direction)
Set the direction of the BFS/DFS traversal.
|
Traversal |
filter(java.util.function.Predicate<PgxVertex> filter)
Filter the vertices in the BFS/DFS traversal.
|
Traversal |
forward(java.util.function.Consumer<PgxVertex> forward)
Visit the vertex in the forward direction of the BFS traversal.
|
static Traversal |
inBFS(PgxGraph graph, PgxVertex root)
Create a BFS traversal in the given graph rooted at the given vertex.
|
static Traversal |
inDFS(PgxGraph graph, PgxVertex root)
Create a DFS traversal in the given graph rooted at the given vertex.
|
Traversal |
navigator(java.util.function.Predicate<PgxVertex> navigator)
If the navigator is false, do not consider the neighbors of this vertex in the traversal.
|
static void |
stopTraversal()
Abort the current traversal.
|
Traversal backward(java.util.function.Consumer<PgxVertex> backward)
backward
-Traversal backwardFilter(java.util.function.Predicate<PgxVertex> filter)
filter
-static int currentLevel()
Traversal direction(Traversal.Direction direction)
direction
-Traversal filter(java.util.function.Predicate<PgxVertex> filter)
filter
-Traversal forward(java.util.function.Consumer<PgxVertex> forward)
forward
-static Traversal inBFS(PgxGraph graph, PgxVertex root)
graph
-root
-static Traversal inDFS(PgxGraph graph, PgxVertex root)
graph
-root
-Traversal navigator(java.util.function.Predicate<PgxVertex> navigator)
navigator
-static void stopTraversal()