GraphEngine
Engine for traversing and querying the Knowledge Graph.
Value parameters
- graph
-
The graph to traverse
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Finds all paths between two nodes up to a maximum length.
Finds all paths between two nodes up to a maximum length.
Value parameters
- endNodeId
-
The ID of the target node
- maxLength
-
Maximum path length (number of edges)
- startNodeId
-
The ID of the starting node
Attributes
- Returns
-
List of all paths found
Finds the shortest path between two nodes using BFS.
Finds the shortest path between two nodes using BFS.
Value parameters
- endNodeId
-
The ID of the target node
- startNodeId
-
The ID of the starting node
Attributes
- Returns
-
Option containing the list of edges representing the path, or None if no path found
Gets all nodes within a certain distance.
Gets all nodes within a certain distance.
Value parameters
- distance
-
Exact distance (number of hops)
- startNodeId
-
The ID of the starting node
Attributes
- Returns
-
Set of nodes at the specified distance
Traverses the graph starting from a given node using Breadth-First Search (BFS).
Traverses the graph starting from a given node using Breadth-First Search (BFS).
Value parameters
- filter
-
A predicate to filter nodes and edges during traversal. Returns true if the traversal should continue through this edge to the target node.
- maxDepth
-
The maximum depth of traversal
- startNodeId
-
The ID of the starting node
Attributes
- Returns
-
A Set of visited Nodes
Traverses the graph using Depth-First Search (DFS).
Traverses the graph using Depth-First Search (DFS).
Value parameters
- filter
-
A predicate to filter nodes and edges during traversal
- maxDepth
-
The maximum depth of traversal
- startNodeId
-
The ID of the starting node
Attributes
- Returns
-
A Set of visited Nodes