graphtransliterator-ts


graphtransliterator-ts / updateNode

Function: updateNode()

updateNode<T, N, E>(graph, targetNodeId, updater): DirectedGraph<T, N, E>

Defined in: Graphs.ts:287

In-place modification function overriding data properties tied to a specific node coordinate. If the provided targetNodeId falls out of the collection boundary bounds, the original topology is returned unmodified.

Type Parameters

T

T

N

N

E

E

Parameters

graph

DirectedGraph<T, N, E>

targetNodeId

number

updater

(oldData) => N

Returns

DirectedGraph<T, N, E>