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

Variable Index

 o edges
The edges Table in the database

Constructor Index

 o PersistentGraph(Database, String)
Create a new PersistentGraph.

Method Index

 o addEdge(Id, Id)
Add an edge.
 o IdIdListImage()
Return an Id to IdList image of the graph.
 o IdKeysImage()
Return an Id to IdList image of the graph.
 o reachableSet(Id)
Get the set of nodes that are reachable from this node, with cycles handled correctly!
 o reachableSetStopAtMeasure(Id, Id, Table)
Get the set of nodes at the indicated measure that are reachable from this initial node.
 o save()
Save the graph to disk.

Variables

 o edges
  public Table edges
The edges Table in the database

Constructors

 o 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!)

Methods

 o IdIdListImage
  public String IdIdListImage()
Return an Id to IdList image of the graph.

 o IdKeysImage
  public String IdKeysImage()
Return an Id to IdList image of the graph.

 o 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
 o 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
 o 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.
 o save
  public void save()
Save the graph to disk. Needed?


All Packages  Class Hierarchy  This Package  Previous  Next  Index