proc newPath(anchor: Node): Path {...}{.raises: [], tags: [].}
-
Create a new path with anchor.
Source
Edit
proc initPathCollection(): PathCollection {...}{.raises: [], tags: [].}
-
Initialize a new path collection
Source
Edit
proc len(p: Path): int {...}{.raises: [], tags: [].}
-
Return the length of the path.
Source
Edit
proc first(p: Path): Edge {...}{.raises: [], tags: [].}
-
Return the first edge in the path (O(1) operation).
Source
Edit
proc last(p: Path): Edge {...}{.raises: [], tags: [].}
-
Return the last edge in the path (O(1) operation).
Source
Edit
proc nth(p: Path; n: int): Edge {...}{.raises: [ValueError], tags: [].}
-
Return the n:th member of the path (O(n) operation).
Source
Edit
proc hash(p: Path): Hash {...}{.raises: [], tags: [].}
-
Create hash for path based on edge oids
Source
Edit
proc `==`(self, other: Path): bool {...}{.raises: [], tags: [].}
-
Check if two paths are equal.
Source
Edit
proc `$`(m: Member): string {...}{.raises: [ValueError], tags: [].}
-
Stringify a path member.
Source
Edit
proc `$`(p: Path): string {...}{.raises: [ValueError], tags: [].}
-
Stringify a path.
Source
Edit
proc pop(p: Path): Edge {...}{.raises: [ValueError], tags: [].}
-
Remove the last path value and return it
Source
Edit
proc add(pc: var PathCollection; p: Path) {...}{.raises: [], tags: [].}
-
Add a path to the path collection
Source
Edit
proc len(pc: PathCollection): int {...}{.raises: [], tags: [].}
-
Source
Edit
proc step(pc: PathCollection; edgeLabel, nodeLabel: string): PathCollection {...}{.
raises: [KeyError, Exception], tags: [RootEffect].}
-
Add a step to a path collection.
Source
Edit
proc steps(pc: PathCollection; edgeLabel, nodeLabel: string; nsteps: int = 1): PathCollection {...}{.
raises: [KeyError, Exception], tags: [RootEffect].}
-
Repeat a number of fixed steps
Source
Edit
proc follow(pc: PathCollection; edgeLabel, nodeLabel: string): PathCollection {...}{.
raises: [KeyError, Exception], tags: [RootEffect].}
-
Repeat steps until there are no further matching paths
Source
Edit