T
- Type parameter of MTBGraphNode. Possible choices are Point, Point2D,
Integer, etc.public class MTBGraphNode<T> extends Object
MTBGraphEdge
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
MTBGraphNode(T data)
Constructor to create a new MTBGraphNode object.
|
Modifier and Type | Method and Description |
---|---|
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() |
protected T data
protected Vector<MTBGraphEdge> inEdges
protected Vector<MTBGraphEdge> outEdges
public MTBGraphNode(T data)
data
- data of the MTBGraphNodepublic 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()
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.