Given Dag and a List of immutable nodes, and a function to get dependencies, compute the dependants (reverse the graph)
Expr[T, N] is an expression of a graph of container nodes N[_] with result type N[T].
This is a useful cache for memoizing heterogenously types functions
This is a weak heterogenous map.
The Expressions are assigned Ids.
This represents literal expressions (no variable redirection) of container nodes of type N[T]
Often a partial function is an easier way to express rules
This implements a simplification rule on ExpressionDags
Return the depth of each node in the dag.
Return the depth of each node in the dag. a node that has no dependencies has depth == 0 else it is max of parent + 1
Behavior is not defined if the graph is not a DAG (for now, it runs forever, may throw later)
Return the depth first enumeration of reachable nodes, NOT INCLUDING INPUT, unless it can be reached via neighbors
Return a NeighborFn for the graph of reversed edges defined by this set of nodes and nf We avoid Sets which use hash-codes which may depend on addresses which are not stable from one run to the next.
Collection of graph algorithms