| org.geotools.graph.structure.Node
All known Subclasses: org.geotools.graph.structure.opt.OptNode, org.geotools.graph.structure.basic.BasicNode,
Node | public interface Node extends Graphable(Code) | | Represents a node in a graph. A node is a point in a graph which is
iadjacent to 0 or more edges. The collection of
edges that are incident/ adjacent to the node, is referred to as the
"adjacency list" of the node.
See Also: Graph See Also: Edge author: Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net |
Method Summary | |
public void | add(Edge e) Adds an edge to the adjacency list of the node. | public int | getDegree() Returns the degree of the node. | public Edge | getEdge(Node other) Returns an edge in the adjacency list of the node that is adjacent to
another specified node. | public List | getEdges(Node other) Returns a collection of edges in the adjacency list of the node that are
adjacent to another specified node. | public List | getEdges() Returns the edge adjacency list of the node. | public void | remove(Edge e) Removes an edge from the adjacency list of the node. |
add | public void add(Edge e)(Code) | | Adds an edge to the adjacency list of the node.
Parameters: e - Adjacent edge to add. |
getDegree | public int getDegree()(Code) | | Returns the degree of the node. The degree of a node is defined as the
number of edges that are adjacent to the node.
int Degree of node. |
getEdge | public Edge getEdge(Node other)(Code) | | Returns an edge in the adjacency list of the node that is adjacent to
another specified node.
Note: It is possible for two nodes to share multiple edges between them. In
this case, getEdges(Node other) can be used to obtain a complete list.
Parameters: other - The other node that the desired edge to return is adjacent to. The first edge that is found to be adjacent to the specified node. |
getEdges | public List getEdges(Node other)(Code) | | Returns a collection of edges in the adjacency list of the node that are
adjacent to another specified node.
Parameters: other - The other node that the desired edges to return are adjacent to. List of all edges that are found to be adjacent to the specifiednode. |
getEdges | public List getEdges()(Code) | | Returns the edge adjacency list of the node.
A list containing all edges that are adjacent to the node. |
remove | public void remove(Edge e)(Code) | | Removes an edge from the adjacency list of the node.
Parameters: e - Adjacent edge to remove. |
|
|