|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Node
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.
Graph
,
Edge
Method Summary | |
---|---|
void |
add(Edge e)
Adds an edge to the adjacency list of the node. |
int |
getDegree()
Returns the degree of the node. |
Edge |
getEdge(Node other)
Returns an edge in the adjacency list of the node that is adjacent to another specified node. |
List |
getEdges()
Returns the edge adjacency list of the node. |
List |
getEdges(Node other)
Returns a collection of edges in the adjacency list of the node that are adjacent to another specified node. |
void |
remove(Edge e)
Removes an edge from the adjacency list of the node. |
Methods inherited from interface Graphable |
---|
getCount, getID, getObject, getRelated, isVisited, setCount, setID, setObject, setVisited |
Method Detail |
---|
void add(Edge e)
e
- Adjacent edge to add.void remove(Edge e)
e
- Adjacent edge to remove.Edge getEdge(Node other)
other
- The other node that the desired edge to return is adjacent to.
List getEdges(Node other)
other
- The other node that the desired edges to return are
adjacent to.
List getEdges()
int getDegree()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |