@graphty/algorithms / index / getConnectedComponent
Function: getConnectedComponent() ​
getConnectedComponent(
graph,nodeId):NodeId[]
Defined in: algorithms/components/connected.ts:121
Get the connected component containing a specific node
Parameters ​
graph ​
The input graph (must be undirected)
nodeId ​
The node ID to find the component for
Returns ​
NodeId[]
Array of node IDs in the same component as the specified node