Something like
sorted(fifo, edges);
sorted(lifo, edges);
sorted(Array, edges);
sorted(() => new Heap(increasing), edges);
Kahn's algo needs {push, pop/shift, isEmpty/length/size}. The convenience wrapper needs to build a queue from the set of free vertices. Currently done with push, but could be done with from.
Something like
Kahn's algo needs
{push, pop/shift, isEmpty/length/size}. The convenience wrapper needs to build a queue from the set of free vertices. Currently done withpush, but could be done withfrom.