Module providers_topo

This is a pretty simple topological sort for erlang.

Authors: Joe Armstrong, Eric Merritt.

Description

This is a pretty simple topological sort for erlang. It was originally written for ermake by Joe Armstrong back in '98. It has been pretty heavily modified by Eric Merritt since '06 and modified again for relx/rebar3 by Tristan Sloughter.

A partial order on the set S is a set of pairs {Xi,Xj} such that some relation between Xi and Xj is obeyed.

A topological sort of a partial order is a sequence of elements [X1, X2, X3 ...] such that if whenever {Xi, Xj} is in the partial order i < j

Data Types

pair()

pair() = {{atom(), atom()}, {atom(), atom()}}

Function Index

sort/1Do a topological sort on the list of pairs.

Function Details

sort/1

sort(Pairs::[pair()]) -> {ok, [{atom(), atom()}]} | {error, any()}

Do a topological sort on the list of pairs.


Generated by EDoc, May 1 2024, 06:16:41.