For a binary adjacency matrix M, which represents a directed graph, ALLTOPOSORT(M) returns a matrix with all plausible topological sorting arrangements.
The function is an implementation of an algorithm from "An algorithm to generate all topological sorting arrangements" by Y. L. Varol and D. Rotem.
Jan Motl (2020). Get all topological sorting arangements (https://www.mathworks.com/matlabcentral/fileexchange/56421-get-all-topological-sorting-arangements), MATLAB Central File Exchange. Retrieved .
Also permits binary adjacency matrices