Class encapsulating a persistent graph.
Copyright ©
1997 Curtis
E. Dyreson. All rights reserved. Please be aware of
the the Licence manpage and the Version manpage.
A persistent graph is a DBMDatabase::Table mapping from nodes to to nodes.
- A DBMDatabase::Database, the database where the graph will live
-item * $name
- A string, the name of the graph
Create a new persistent graph.
Return an Id to IdList image of the graph.
Return an Id to IdList image of the graph.
- An DBMDatabase::Id, the from node.
- An DBMDatabase::Id, the to node.
Add an edge.
- An DBMDatabase::Id, the node to start from
- A hash table reference, the cache of which nodes are reachable from which
Get the set of nodes that are reachable from this node. Allow cycles, and cache intermediate results to build a complete table of reachable nodes. Returns an DBMDatabase::IdSet, the set of reachable nodes.
- A DBMDatabase::Id, the unit to begin searching from.
- A DBMDatabase::Id, the measure at which to stop.
- A DBMDatabase::Table, the table that associates units with their measures.
Get the set of nodes at the indicated measure that are reachable from this initial node. Assume for now that the graph is a strict hierarchy, in future we will relax this assumption.
Return a reference to the dbm file.
Save any changes to the persistent graph to disk.
- An DBMDatabase::IdSet, the set of reachable nodes.
- An DBMDatabase::Id, the node to start from
Get the set of nodes that are reachable from this node. And allow cycles! Build the resulting set in the $result
variable.
A helper function for reachableSet.