Pudu programming language
Menu
API reference

Std.Graph.stronglyConnected

1 declaration

fn

stronglyConnected: &Std.Graph.Graph[N] -> Array[Array[N]] where N: Ord

This is a callable function.

What it does

The groups of nodes that can all reach each other.

A node reaches every node in its own group and they all reach it back, so a

group of more than one is a cycle and the groups themselves, taken as

units, have none. This is what turns a circular dependency graph into

something that can be ordered: the cycles become single items.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.
  • Names inside [ ] are type arguments, such as the item type held by a collection.

Back to Std.GraphSearch related declarations