loom.alg-generic
(source)Graph algorithms for use on any type of graph
| Public Variable | Short Description |
|---|---|
| ->Ancestry (clj) | |
| Ancestry (clj) | |
| ancestor? (clj) | Finds if the 'parenter node is an ancestor of 'childer node for the given 'ancestry cache. |
| ancestors (clj) | Returns all of the ancestors of 'child node. |
| ancestry-add (clj) | Adds a 'node and its 'parents associations to the 'ancestry cache. |
| ancestry-contains? (clj) | Finds if a 'node is contained in the 'ancestry cache. |
| ancestry-new (clj) | Create a new, empty Ancestry cache. |
| ancestry-nodes (clj) | Returns all of the nodes in an 'ancestry. |
| bf-path (clj) | Returns a path from start to end with the fewest hops (i.e. |
| bf-path-bi (clj) | Using a bidirectional breadth-first search, finds a path from start to end with the fewest hops (i.e. |
| bf-paths-bi (clj) | Using a bidirectional breadth-first search, returns all shortest paths from start to end; predecessors is called on end and each preceding node, successors is called on start, etc. |
| bf-span (clj) | Return a breadth-first spanning tree of the form {node [successors]}. |
| bf-traverse (clj) | Traverses a graph breadth-first from start, successors being a function that returns adjacent nodes. |
| bits-per-long (clj) | |
| bm-get (clj) | Get boolean state of bit in 'bitmap at 'idx. |
| bm-get-indicies (clj) | Get the indicies of set bits in 'bitmap. |
| bm-longs (clj) | Returns the number of longs required to store bits count bits in a bitmap. |
| bm-new (clj) | Create new empty bitmap. |
| bm-or (clj) | Logically OR 'bitmaps together. |
| bm-set (clj) | Set boolean state of bit in 'bitmap at 'idx to true. |
| dijkstra-path (clj) | Finds the shortest path from start to end, where successors and dist are functions called as (successors node) and (dist node1 node2). |
| dijkstra-path-dist (clj) | Finds the shortest path from start to end, where successors and dist are functions called as (successors node) and (dist node1 node2). |
| dijkstra-span (clj) | Finds all shortest distances from start, where successors and dist are functions called as (successors node) and (dist node1 node2). |
| dijkstra-traverse (clj) | Returns a lazy-seq of [current-node state] where state is a map in the format {node [distance predecessor]}. |
| map->Ancestry (clj) | |
| paths (clj) | Returns a lazy seq of all non-looping path vectors starting with [<start-node>]. |
| post-edge-traverse (clj) | Traverses a graph depth-first postorder from start, successors being a function that returns direct successors for the node. |
| post-traverse (clj) | Traverses a graph depth-first postorder from start, successors being a function that returns adjacent nodes. |
| pre-edge-traverse (clj) | Traverses a graph depth-first preorder from start, successors being a function that returns direct successors for the node. |
| pre-span (clj) | Returns a depth-first spanning tree of the form {node [successors]}. |
| pre-traverse (clj) | Traverses a graph depth-first preorder from start, successors being a function that returns direct successors for the node. |
| preds->span (clj) | Converts a map of the form {node predecessor} to a spanning tree of the form {node [successors]}. |
| topsort-component (clj) | Topological sort of a component of a (presumably) directed graph. |
| trace-path (clj) | Using a map of nodes-to-preds, traces a node's family tree back to the source. |
| trace-paths (clj) | Given a function and a starting node, returns all possible paths back to source. |