|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AbstractGraph
This abstract class provides a skeleton implementation of the
Graph
interface to minimize the effort to implement this
interface.
Graph
,
NodeIterator
Constructor Summary | |
AbstractGraph()
|
Method Summary | |
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to the Graph to be notified of structural changes. |
java.lang.Object |
clone()
Returns an exact copy of the object. |
boolean |
connected(int i,
int j)
True if nodes i and j are connected,
false otherwise. |
protected void |
fireStateChanged()
Send a ChangeEvent, whose source is this Graph, to each listener. |
java.lang.String[] |
gmlEdgeLabels(int i)
Returns the edge labels of node i to be used for saving the Graph in GML-format; this is a default implementation returning null, indicating that no edge label is used. |
boolean |
isTree(int[] nodeset)
Checks of the nodes in the nodeset form a vertex induced tree. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes the ChangeListener l from the Graph. |
void |
toGml(java.io.PrintStream out)
Prints the graph in its current state to the PrintStream in gml-format (graphlet). |
java.lang.String |
toString()
Returns a string representation of the graph in adjacencylist format: |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface Graph |
first, isRemoved, last, neighbors, nodeIterator, nrOfEdges, nrOfNodes, order |
Constructor Detail |
public AbstractGraph()
Method Detail |
public boolean connected(int i, int j)
i
and j
are connected,
false otherwise.
connected
in interface Graph
i
- a node of the Graphj
- a node of the Graph
i
and j
are
connected, false otherwisepublic void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener
in interface Graph
l
- the ChangeListener to be addedpublic void removeChangeListener(javax.swing.event.ChangeListener l)
removeChangeListener
in interface Graph
l
- the ChangeListener to be removedprotected void fireStateChanged()
public boolean isTree(int[] nodeset)
isTree
in interface Graph
nodeset
- the nodes to be checked if they induce a tree
public java.lang.String toString()
0: nghb1 nghb2 nghb3 ... i: nghbi1 nghbi2 nghbi3 ...
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public void toGml(java.io.PrintStream out)
toGml
in interface Graph
out
- the PrintStream to which output will be written.public java.lang.String[] gmlEdgeLabels(int i)
i
- node of which the edge labels must be returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |