proc numberOfNodes(self: Graph): int {...}{.raises: [], tags: [].}
-
Return number of Nodes in Graph
Source
Edit
proc numberOfEdges(self: Graph): int {...}{.raises: [], tags: [].}
-
Return number of Edges in Graph
Source
Edit
proc nodeLabels(self: Graph): seq[string] {...}{.raises: [], tags: [].}
-
Return all node labels in the graph
Source
Edit
proc edgeLabels(self: Graph): seq[string] {...}{.raises: [], tags: [].}
-
Return all edge labels in the graph
Source
Edit
proc `$`(self: Graph): string {...}{.raises: [ValueError], tags: [].}
-
Pretty-print Graph
Source
Edit
proc contains(self: Graph; key: string): bool {...}{.raises: [], tags: [].}
-
Check if Node or Edge oid is in Graph
Source
Edit
proc contains(self: Graph; key: Node): bool {...}{.raises: [], tags: [].}
-
Check if Node object is in Graph
Source
Edit
proc contains(self: Graph; key: Edge): bool {...}{.raises: [], tags: [].}
-
Check if Edge object is in Graph
Source
Edit
proc newGraph(name: string = "graph"): Graph {...}{.raises: [], tags: [].}
-
Create a new graph
Source
Edit
proc addNode(self: Graph; label: string; data: Table[string, Box] = initTable();
oid: string = $genOid()): string {...}{.raises: [], tags: [].}
-
Add node to graph.
Source
Edit
proc addNode(self: Graph; n: Node): string {...}{.raises: [], tags: [].}
-
Add node to graph.
Source
Edit
proc addEdge(self: Graph; e: Edge): string {...}{.raises: [], tags: [].}
-
Add edge to graph.
Source
Edit
proc addEdge(self: Graph; A: Node; B: Node; label: string;
data: Table[string, Box] = initTable(); oid: string = $genOid()): string {...}{.
raises: [], tags: [].}
-
Add edge to graph
Source
Edit
proc addEdge(self: Graph; A: string; B: string; label: string;
data: Table[string, Box] = initTable(); oid: string = $genOid()): string {...}{.
raises: [KeyError], tags: [].}
-
Add edge to graph.
Source
Edit
proc node(self: Graph; node: string): Node {...}{.raises: [KeyError], tags: [].}
-
Return node with oid in graph
Source
Edit
proc edge(self: Graph; edge: string): Edge {...}{.raises: [KeyError], tags: [].}
-
Return edge with oid in graph
Source
Edit
proc hasEdge(self: Graph; A: string; B: string;
direction: Direction = Direction.Out): bool {...}{.raises: [KeyError],
tags: [].}
-
Check if there is an edge between nodes A and B in direction in the graph.
Source
Edit
proc delEdge(self: Graph; oid: string): bool {...}{.raises: [KeyError], tags: [].}
-
Delete edge with oid in graph, return true if edge was in graph and false otherwise.
Source
Edit
proc delNode(self: Graph; oid: string): bool {...}{.raises: [Exception, KeyError],
tags: [RootEffect].}
-
Delete node with oid in graph, return true if node was in graph and false otherwise.
Source
Edit
proc describe(g: Graph; lineWidth = 100): string {...}{.
raises: [KeyError, ValueError], tags: [].}
-
Return a nice pretty-printed summary of the graph g
Source
Edit
proc navigate(g: Graph; anchor: string): PathCollection {...}{.raises: [KeyError],
tags: [].}
-
Navigate paths by pattern matching in graph
Source
Edit