Home > @datashaper/workflow > DefaultGraph
Signature:
export declare class DefaultGraph<T> implements Graph<T> Implements: Graph<T>
| Property | Modifiers | Type | Description |
|---|---|---|---|
| nodes | readonly |
NodeId[] | Get a list of NodeIDs |
| Method | Modifiers | Description |
|---|---|---|
| add(node) | Add a node to the graph | |
| clear() | Clear the graph and remove all nodes | |
| hasNode(id) | Check if the graph has a node with the given ID | |
| node(id) | Get a node by id | |
| printStats() | Print per-node stats of the graph | |
| remove(removeId) | Remove a node by ID from the graph | |
| validate() | Validate the graph, checking for any cycles |