Interface Traversal
public interface Traversal
Utility functions to build a BFS/DFS traversal.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionVisit the vertex in the backward direction of the traversal.backwardFilter(Predicate<PgxVertex> filter) Filter the vertices in the BFS/DFS traversal when going backward.static intGet the current level of the BFS/DFS traversal.direction(Traversal.Direction direction) Set the direction of the BFS/DFS traversal.Filter the vertices in the BFS/DFS traversal.Visit the vertex in the forward direction of the BFS traversal.static TraversalCreate a BFS traversal in the given graph rooted at the given vertex.static TraversalCreate a DFS traversal in the given graph rooted at the given vertex.If the navigator is false, do not consider the neighbors of this vertex in the traversal.static voidAbort the current traversal.
-
Method Details
-
inBFS
-
inDFS
-
currentLevel
static int currentLevel()Get the current level of the BFS/DFS traversal.- Returns:
-
stopTraversal
static void stopTraversal()Abort the current traversal. -
filter
-
forward
-
backwardFilter
-
backward
-
direction
Set the direction of the BFS/DFS traversal.- Parameters:
direction-- Returns:
-