graphtransliterator-ts / addNode
Function: addNode()
addNode<
T,N,E>(graph,type_,label,data): [DirectedGraph<T,N,E>,Node<T,N>]
Defined in: Graphs.ts:220
Stitches a fresh vertex node onto an existing graph context using pure state propagation.
Type Parameters
T
T
N
N
E
E
Parameters
graph
DirectedGraph<T, N, E>
type_
T
label
string
data
N
Returns
[DirectedGraph<T, N, E>, Node<T, N>]
A tuple containing the updated DirectedGraph instance alongside the newly minted Node payload.