Accessible via require('@buggyorg/graphtools').Algorithm
A collection of algorithms that act on the port graph.
(require("Algorithm"))(compound, graph) → {Array.<Node>}
Returns a topological sorting of the graph.
Parameters:
Name | Type | Description |
---|---|---|
compound |
Node | A compound node to perform the topological sort in. The sorting is only considering nodes directly inside the compound. It does not go into further compounds. |
graph |
PortGraph | The graph. |
- Source:
Throws:
-
If the graph has loops.
- Type
- Error
Returns:
A sorting of the nodes given as an array of nodes.
- Type
- Array.<Node>
- Source: