|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.bbk.dcs.automed.graph.DirectedGraphNode
public class DirectedGraphNode
Class that abstracts a node in a directed unlabelled graph.
Field Summary | |
---|---|
(package private) static int |
dangling
|
(package private) java.util.Set |
incomingEdges
|
(package private) static int |
intermediate
|
(package private) static int |
leaf
|
(package private) java.lang.String |
nodeName
|
(package private) java.util.Set |
outgoingEdges
|
(package private) static int |
root
|
private int |
type
|
private boolean |
visited
|
Constructor Summary | |
---|---|
DirectedGraphNode(java.lang.String name)
|
Method Summary | |
---|---|
void |
addIncomingEdge(DirectedGraphNode n)
Adds a node in the set of incoming edges of the calling node. |
void |
addOutgoingEdge(DirectedGraphNode n)
Adds a node in the set of outgoing edges of the calling node. |
protected java.util.Set |
getIncomingEdges()
|
protected java.lang.String |
getName()
|
protected java.util.Set |
getOutgoingEdges()
|
protected int |
getType()
|
protected void |
unvisit()
Marks the calling node as unvisited |
protected void |
visited()
Marks the calling node as visited. |
protected boolean |
wasVisited()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean visited
java.lang.String nodeName
java.util.Set incomingEdges
java.util.Set outgoingEdges
private int type
static final int root
static final int intermediate
static final int leaf
static final int dangling
Constructor Detail |
---|
public DirectedGraphNode(java.lang.String name)
name
- the name of the nodeMethod Detail |
---|
protected java.lang.String getName()
public void addIncomingEdge(DirectedGraphNode n) throws XMLException
n
-
XMLException
public void addOutgoingEdge(DirectedGraphNode n) throws XMLException
n
- the node to add
XMLException
protected int getType()
protected boolean wasVisited()
protected void visited()
protected void unvisit()
protected java.util.Set getIncomingEdges()
protected java.util.Set getOutgoingEdges()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |