Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tsort: allow independent nodes (#761)
* When a node refers to itself in a pair it means the node exists but does not depend on anything * Previously, this input would result in a "cycle" error * In test file, allow node 'd' to be added to npred-hash with a predecessor count of zero, so it can appear in list-list * The inner "foreach" loop does not execute for node 'd' because it has no dependency; it has no need for an entry in succ-hash %perl cat in.tsort2 a b b c d d %perl tsort.old in.tsort2 a b c tsort.old: cycle detected %perl tsort in.tsort2 a b c d %perl cat in.tsort3 a a %perl tsort in.tsort3 a
- Loading branch information