Class EDU.auburn.VGJ.graph.Graph
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class EDU.auburn.VGJ.graph.Graph

java.lang.Object
   |
   +----EDU.auburn.VGJ.graph.Graph

public class Graph
extends Object
implements Cloneable
A class for representing a graph abstractly.

Here is the source.

Constructor Index

 o Graph()
construct empty graph
 o Graph(boolean)
construct empty graph with direction
 o Graph(GMLobject)

Method Index

 o children(int)
 o clone()
makes a copy of the current graph
 o copy(Graph)
Copy the properties of another graph.
 o dummysToEdgePaths()
Convert dummy nodes to edge paths.
 o firstAvailable()
 o firstNode()
 o firstNodeIndex()
 o getEdge(int, int)
 o getEdgePathPoints(int, int)
Get the path points for an edge.
 o getEdges()
 o getIndexFromNode(Node)
 o getNodeFromId(int)
 o getNodeFromIndex(int)
 o group(Node, boolean)
 o highestIndex()
 o insertEdge(Edge)
Insert an edge.
 o insertEdge(int, int)
insert an edge between two nodes
 o insertEdge(int, int, DPoint3[])
Insert an edge with path points.
 o insertEdge(int, int, DPoint3[], String)
Insert an edge with path points and a label.
 o insertNode()
insert new node into graph; no initial connections
 o insertNode(boolean)
Insert new node or dummy node into the graph.
 o insertNodeAt(int)
insert new node into graph; into the nodelist at the index
 o isDirected()
function to determine the graph type (directed or undirected)
 o killGroup(Node)
 o nextNode(Node)
 o nextNodeIndex(int)
 o nodeFromIndex(int)
 o numberOfNodes()
 o pack()
Re-index so the indexes go from 0 to number of nodes - 1.
 o parents(int)
 o removeEdge(Edge)
 o removeEdge(int, int)
remove the connection from n1 to n2 but leave the nodes in place
 o removeEdgePaths()
Eliminate edge paths.
 o removeGroups()
 o removeNode(int)
remove the node from the graph(also removes the edges connected to it)
 o removeNode(Node)
remove the node from the graph
 o setDirected(boolean)
 o setGMLvalues(GMLobject)
Set the GML values of a GML object to those of this Graph.
 o setNodeGroup(Node, Node)

Constructors

 o Graph
  public Graph()
construct empty graph
 o Graph
  public Graph(boolean yesorno)
construct empty graph with direction
 o Graph
  public Graph(GMLobject gml)

Methods

 o setGMLvalues
  public void setGMLvalues(GMLobject gml)
Set the GML values of a GML object to those of this Graph.
 o isDirected
  public boolean isDirected()
function to determine the graph type (directed or undirected)
Returns:
boolean value
 o clone
  public Object clone()
makes a copy of the current graph
Returns:
copy of current graph
Overrides:
clone in class Object
 o copy
  public void copy(Graph newgraph)
Copy the properties of another graph. This assumes the other graph will be subsequently deleted - otherwise use copy(clone(graph_to_copy)).
 o insertNode
  public int insertNode()
insert new node into graph; no initial connections
Returns:
index of the new node
 o insertNode
  public int insertNode(boolean dummy)
Insert new node or dummy node into the graph.
Returns:
index of the new node
 o getNodeFromIndex
  public Node getNodeFromIndex(int index)
Returns:
s the node at the 'index'
 o getNodeFromId
  public Node getNodeFromId(int id)
 o insertNodeAt
  public void insertNodeAt(int index) throws IOException
insert new node into graph; into the nodelist at the index
Parameters:
integer - index to place node
Returns:
nodeList_ with the new node
 o removeNode
  public void removeNode(int n)
remove the node from the graph(also removes the edges connected to it)
 o removeNode
  public void removeNode(Node nin)
remove the node from the graph
 o insertEdge
  public void insertEdge(int n1,
                         int n2)
insert an edge between two nodes
Parameters:
two - integers node indexes
 o insertEdge
  public void insertEdge(int n1,
                         int n2,
                         DPoint3 points[])
Insert an edge with path points.
 o insertEdge
  public void insertEdge(int n1,
                         int n2,
                         DPoint3 points[],
                         String label)
Insert an edge with path points and a label.
 o insertEdge
  public void insertEdge(Edge edge)
Insert an edge.
 o getEdgePathPoints
  public DPoint3[] getEdgePathPoints(int n1,
                                     int n2)
Get the path points for an edge.
 o getEdge
  public Edge getEdge(int n1,
                      int n2)
 o removeEdge
  public void removeEdge(int n1,
                         int n2)
remove the connection from n1 to n2 but leave the nodes in place
Parameters:
integer - index of each node on the edge
 o removeEdge
  public void removeEdge(Edge edge)
 o parents
  public Set parents(int n)
Parameters:
node - to get parents of
Returns:
s a set of all the nodes leading to n
 o children
  public Set children(int n)
Returns:
s a set of all the nodes n leads to
 o numberOfNodes
  public int numberOfNodes()
Returns:
s the number of nodes in the graph
 o firstNode
  public Node firstNode()
Returns:
s the first node of the graph
 o nextNode
  public Node nextNode(Node node)
Returns:
s the next node after node
 o getIndexFromNode
  public int getIndexFromNode(Node node)
Returns:
s the integer value of the index for the node
 o firstNodeIndex
  public int firstNodeIndex()
Returns:
s the index of the first node in graph.nodeList
 o nextNodeIndex
  public int nextNodeIndex(int index)
Returns:
s the index of the next node after the current index
 o firstAvailable
  public int firstAvailable()
 o highestIndex
  public int highestIndex()
 o setDirected
  public void setDirected(boolean directed)
 o pack
  public void pack()
Re-index so the indexes go from 0 to number of nodes - 1.
 o removeEdgePaths
  public void removeEdgePaths()
Eliminate edge paths.
 o dummysToEdgePaths
  public void dummysToEdgePaths()
Convert dummy nodes to edge paths.
 o getEdges
  public Enumeration getEdges()
 o nodeFromIndex
  public Node nodeFromIndex(int index)
 o group
  public void group(Node node,
                    boolean state)
 o killGroup
  public void killGroup(Node node)
 o setNodeGroup
  public void setNodeGroup(Node node,
                           Node groupnode)
 o removeGroups
  public void removeGroups()

All Packages  Class Hierarchy  This Package  Previous  Next  Index