CrossClj

1.0.0 docs

SourceDocs



RECENT
    VARS
    no-incoming
    normalize
    take-1
    topo-sort
    without

    « Index of all namespaces of this project

    (no-incoming g)
    Returns the set of nodes in graph g for which there are no incoming
    edges, where g is a map of nodes to sets of nodes.
    (normalize g)
    Returns g with empty outgoing edges added for nodes with incoming
    edges only.  Example: {:a #{:b}} => {:a #{:b}, :b #{}}
    (take-1 s)
    Returns the pair [element, s'] where s' is set s with element removed.
    
    (topo-sort g)(topo-sort g l s)
    Proposes a topological sort for directed graph g using Kahn's
    algorithm, where g is a map of nodes to sets of nodes. If g is
    cyclic, returns nil.
    (without s x)
    Returns set s with x removed.