workflow.defaultgraph.md

February 13, 2024 ยท View on GitHub

Home > @datashaper/workflow > DefaultGraph

DefaultGraph class

Signature:

export declare class DefaultGraph<T> implements Graph<T> 

Implements: Graph<T>

Properties

PropertyModifiersTypeDescription
nodesreadonlyNodeId[]Get a list of NodeIDs

Methods

MethodModifiersDescription
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