|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.core.datatypes.MTBGraphNode<T>
T
- Type parameter of MTBGraphNode. Possible choices are Point, Point2D,
Integer, etc.@ALDMetaInfo(export=ALLOWED) public class MTBGraphNode<T>
Class implements MTBGraphNodes for the MTBGraph. Each MTBGraphNode has data and incoming and outgoing edges. If the edge is undirected, there is no difference between incoming and outgoing edges.
MTBGraphEdge
Field Summary | |
---|---|
protected T |
data
MTBGraphNode data. |
protected Vector<MTBGraphEdge> |
inEdges
Vector of incoming edges of the MTBGraphNode. |
protected Vector<MTBGraphEdge> |
outEdges
Vector of outgoing edges of the MTBGraphNode. |
Constructor Summary | |
---|---|
MTBGraphNode(T data)
Constructor to create a new MTBGraphNode object. |
Method Summary | |
---|---|
protected void |
addInEdge(MTBGraphEdge inEdge)
Add a incoming MTBGraphEdge to the MTBGraphNode |
protected void |
addOutEdge(MTBGraphEdge outEdge)
Add a outgoing MTBGraphEdge to the MTBGraphNode |
Vector<MTBGraphEdge> |
getAllEdges()
Get all edges of the node. |
T |
getData()
Get data of MTBGraphNode. |
Vector<MTBGraphEdge> |
getInEdges()
Get input edges for node. |
Vector<MTBGraphNode<T>> |
getNeighbors()
Get all neighbors of the current node. |
int |
getNumberOfInEdges()
Get number of incoming edges for MTBGraphNode. |
int |
getNumberOfOutEdges()
Get number of outgoing edges for MTBGraphNode. |
Vector<MTBGraphEdge> |
getOutEdges()
Get outgoing edges for node. |
int |
getTotalNumberOfEdges()
Get total number of edges for MTBGraphNode. |
protected void |
removeInEdge(MTBGraphEdge inEdge)
Remove a incoming MTBGraphEdge from the MTBGraphNode. |
protected void |
removeOutEdge(MTBGraphEdge outEdge)
Remove a outgoing MTBGraphEdge from the MTBGraphNode. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected T data
protected Vector<MTBGraphEdge> inEdges
protected Vector<MTBGraphEdge> outEdges
Constructor Detail |
---|
public MTBGraphNode(T data)
data
- data of the MTBGraphNodeMethod Detail |
---|
public Vector<MTBGraphEdge> getInEdges()
protected void addInEdge(MTBGraphEdge inEdge)
inEdge
- incoming MTBGraphEdge to addprotected void removeInEdge(MTBGraphEdge inEdge)
inEdge
- input edge to removepublic Vector<MTBGraphEdge> getOutEdges()
protected void addOutEdge(MTBGraphEdge outEdge)
outEdge
- outgoing MTBGraphEdge to addprotected void removeOutEdge(MTBGraphEdge outEdge)
outEdge
- outgoing edge to removepublic Vector<MTBGraphEdge> getAllEdges()
public int getNumberOfInEdges()
public int getNumberOfOutEdges()
public int getTotalNumberOfEdges()
public T getData()
public Vector<MTBGraphNode<T>> getNeighbors()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |