|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.rwth.graph.Graph.Node
Represents nodes in this graph.
Inner Class Summary | |
class |
Graph.Node.Edge
Represents edges starting or ending in this node. |
Field Summary | |
protected java.lang.String |
attributes
Additional dotty attributes used by the toString method. |
protected java.util.LinkedList |
inEdges
Contains all edges ending in this node. |
protected java.lang.Object |
label
The label of this node. |
protected int |
number
The unique number of this node in the graph. |
protected java.util.LinkedList |
outEdges
Contains all nodes to which an edge starting in this node goes. |
Constructor Summary | |
Graph.Node()
Creates a new node without label or additional attributes in the graph. |
|
Graph.Node(java.lang.Object label)
Creates a new node with label but without additional attributes in the graph. |
|
Graph.Node(java.lang.Object label,
java.lang.String attributes)
Creates a new node with label and attributes in the graph. |
Method Summary | |
void |
bendInEdges(Graph.Node node)
Bends all incoming edges of this node to node . |
void |
bendOutEdges(Graph.Node node)
Bends all outgoing edges of this node to node . |
java.lang.String |
getAttributes()
Gets the attributes of this node. |
Graph |
getGraph()
Gets the containing graph. |
Graph.Node.Edge[] |
getInArray()
Returns an array of all incoming edges of this node. |
int |
getInDegree()
Gets the number of edges with this node as target. |
java.util.Iterator |
getInEdges()
Gets all incoming edges of this node. |
java.lang.Object |
getLabel()
Gets the label of this node. |
Graph.Node.Edge[] |
getOutArray()
Returns an array of all outgoing edges of this node. |
int |
getOutDegree()
Gets the number of edges with this node as source. |
java.util.Iterator |
getOutEdges()
Gets all outgoing edges of this node. |
void |
merge(Graph.Node node)
Merges this Node with the given node, i.e. |
void |
remove()
Removes this node from the graph. |
void |
setAttributes(java.lang.String attributes)
Sets the attributes of this node. |
void |
setLabel(java.lang.Object label)
Sets the label of this node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.LinkedList outEdges
Edge
.protected java.util.LinkedList inEdges
Edge
.protected int number
protected java.lang.Object label
protected java.lang.String attributes
toString
method.Constructor Detail |
public Graph.Node()
public Graph.Node(java.lang.Object label)
label
- The label of the node.public Graph.Node(java.lang.Object label, java.lang.String attributes)
label
- The label of the node.attributes
- The attributes of the nodeMethod Detail |
public Graph getGraph()
public void setLabel(java.lang.Object label)
public java.lang.Object getLabel()
Object
which is the label of this node.public void setAttributes(java.lang.String attributes)
attributes
- a String
valuepublic java.lang.String getAttributes()
String
which are the attributes.public int getInDegree()
public int getOutDegree()
public java.util.Iterator getInEdges()
Iterator
consisting of incoming Edges
.public java.util.Iterator getOutEdges()
Iterator
consisting of outgoing Edges
.public Graph.Node.Edge[] getInArray()
public Graph.Node.Edge[] getOutArray()
public void bendInEdges(Graph.Node node)
node
.java.lang.IllegalArgumentException
- if node
is not a node
in the same graph.public void bendOutEdges(Graph.Node node)
node
.java.lang.IllegalArgumentException
- if node
is not a node
in the same graph.public void remove()
public void merge(Graph.Node node)
Node
with the given node, i.e. all edges of
node
are bended to this node and node
is
removed.node
- a node.java.lang.IllegalArgumentException
- if node
is not a node
in the same graph.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |