Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsort: allow independent nodes #761

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Commits on Oct 16, 2024

  1. tsort: allow independent nodes

    * 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
    mknos authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    4df7582 View commit details
    Browse the repository at this point in the history