Authors: Joe Armstrong, Eric Merritt.
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 < jpair() = {{atom(), atom()}, {atom(), atom()}}
sort/1 | Do a topological sort on the list of pairs. |
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.