Skip to content

@eightkk/vue-weave / core / topologicalOrder

Function: topologicalOrder() ​

topologicalOrder(nodes, edges): TopologicalOrderResult

Defined in: src/core/graphAlgorithms.ts:19

Kahn's algorithm. A self-loop is a cycle. Never throws for cycles; unknown edge endpoints throw an Error.

Parameters ​

nodes ​

readonly IdentifiedNode[]

edges ​

readonly GraphEdge<unknown>[]

Returns ​

TopologicalOrderResult

Released under the MIT License.