|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface of a general graph of which the nodes are labeled with positive integers in an arbitrary way.
NodeIterator
Method Summary | |
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to the YutsisGraph. |
boolean |
connected(int i,
int j)
True if nodes i and j are connected,
false otherwise. |
NodeIterator |
first()
Returns an iterator over the nodeset starting at the node (by calling the next() method) with lowest label in some ordening. |
boolean |
isRemoved(int node)
Returns true if the specified node is removed or not apparent in the graph, false otherwise. |
boolean |
isTree(int[] nodeset)
Checks of the nodes in the nodeset form a vertex induced tree. |
NodeIterator |
last()
Returns an iterator over the nodeset starting at the node with highest label (by calling the previous() method) in some ordening. |
int[] |
neighbors(int node)
Returns the neighbors of the node with label node . |
NodeIterator |
nodeIterator(int node)
Returns an iterator which will return node
by a NodeIterator#next() call. |
int |
nrOfEdges()
Returns the number of edges of the underlying graph. |
int |
nrOfNodes()
Returns the number of nodes of the underlying graph. |
int |
order()
Returns the original order of this graph; there will be nrOfNodes() nodes with labels between
Order() , the latter not
included. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes the ChangeListener l from the YutsisGraph. |
void |
toGml(java.io.PrintStream out)
Prints the graph in its current state to the PrintStream in gml-format (graphlet). |
Method Detail |
public int nrOfNodes()
public int nrOfEdges()
public int order()
nrOfNodes()
nodes with labels between
Order()
, the latter not
included.
nrOfNodes()
public int[] neighbors(int node)
node
.
node
- the node of which the neighbors have to be returned
public boolean connected(int i, int j)
i
and j
are connected,
false otherwise.
i
- a node of the Graphj
- a node of the Graph
i
and j
are
connected, false otherwisepublic boolean isRemoved(int node)
node
- the node to be checked
Yutsis
public boolean isTree(int[] nodeset)
nodeset
- the nodes to be checked if they induce a tree
public NodeIterator first()
NodeIterator
public NodeIterator last()
NodeIterator
public NodeIterator nodeIterator(int node)
node
by a NodeIterator#next() call.
node
- the node to be returned by the first
NodeIterator#next() of the returned
NodeIterator
node
by the
first NodeIterator#next() call.NodeIterator
,
NodeIterator.next()
public void addChangeListener(javax.swing.event.ChangeListener l)
l
- the ChangeListener to be addedpublic void removeChangeListener(javax.swing.event.ChangeListener l)
l
- the ChangeListener to be removedpublic void toGml(java.io.PrintStream out)
out
- the PrintStream to which output will be written.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |