All Packages Class Hierarchy This Package Previous Next Index
Class cube.persistent.PersistentGraph
java.lang.Object
|
+----cube.persistent.PersistentGraph
- public class PersistentGraph
- extends Object
A persistent implementation of a graph. Each graph is a separate table.
For more information on the cube see the cube
Overview.
Copyright © 1997 Curtis E. Dyreson. All rights reserved.
Please be aware of the
Licence
and
Version.
- See Also:
- Database, Table
-
edges
- The edges Table in the database
-
PersistentGraph(Database, String)
- Create a new PersistentGraph.
-
addEdge(Id, Id)
-
Add an edge.
-
IdIdListImage()
-
Return an Id to IdList image of the graph.
-
IdKeysImage()
-
Return an Id to IdList image of the graph.
-
reachableSet(Id)
- Get the set of nodes that are reachable from this node, with cycles
handled correctly!
-
reachableSetStopAtMeasure(Id, Id, Table)
- Get the set of nodes at the indicated measure
that are reachable from this initial node.
-
save()
- Save the graph to disk.
edges
public Table edges
- The edges Table in the database
PersistentGraph
public PersistentGraph(Database db,
String name)
- Create a new PersistentGraph.
- Parameters:
- db - Database where the graph will live
- name - Name of the graph (will create a Table with this name!)
IdIdListImage
public String IdIdListImage()
- Return an Id to IdList image of the graph.
IdKeysImage
public String IdKeysImage()
- Return an Id to IdList image of the graph.
addEdge
public void addEdge(Id from,
Id to)
- Add an edge.
- Parameters:
- from - node that the edge is from
- to - node that the edge is to
reachableSet
public IdSet reachableSet(Id from)
- Get the set of nodes that are reachable from this node, with cycles
handled correctly!
- Parameters:
- from - starting node
reachableSetStopAtMeasure
public IdSet reachableSetStopAtMeasure(Id from,
Id stopMeasure,
Table unitToMeasureTable)
- 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.
- Parameters:
- from - The unit to begin searching from.
- stopMeasure - The measure at which to stop.
- unitToMeasureTable - The table that associates units with their measures.
save
public void save()
- Save the graph to disk. Needed?
All Packages Class Hierarchy This Package Previous Next Index