public class BasicDirectedNode extends BasicGraphable implements DirectedNode
| Constructor and Description |
|---|
BasicDirectedNode()
Constructs a new BasicDirectedNode.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Edge e)
Unsupported operation.
|
void |
addIn(DirectedEdge e)
Adds an edge to the in adjacency list of the node which is an underlying List
implementation.
|
void |
addOut(DirectedEdge e)
Adds an edge to the ou adjacency list of the node which is an underlying List
implementation.
|
int |
getDegree()
Returns sum of sizes of in and out adjacency lists.
|
Edge |
getEdge(Node other)
First searches for an in edge with an out node == this, and in node == other.
|
List<DirectedEdge> |
getEdges()
Returns the combination of both the in and out adjacency lists.
|
List<DirectedEdge> |
getEdges(Node other)
A combination of the results of getInEdges(Node) and getOutEdges(Node).
|
int |
getInDegree()
Returns the in degree of the node.
|
Edge |
getInEdge(DirectedNode other)
Returns an edge that terminates at the node and originates from a specified node.
|
List<DirectedEdge> |
getInEdges()
Returns the in adjacency list of the node.
|
List<DirectedEdge> |
getInEdges(DirectedNode other)
Returns all edges that terminate at the node and originate from a specified node.
|
Iterator<DirectedNode> |
getInRelated()
Returns all in nodes of in edges.
|
int |
getOutDegree()
Returns the out degree of the node.
|
Edge |
getOutEdge(DirectedNode other)
Returns an edge that originates at the node and terminates at a specified node.
|
List<DirectedEdge> |
getOutEdges()
Returns the out adjacency list of the node.
|
List<DirectedEdge> |
getOutEdges(DirectedNode other)
Returns all edges that originate at the node and terminate from at specified node.
|
Iterator<DirectedNode> |
getOutRelated()
Returns all out nodes of out edges.
|
Iterator<DirectedNode> |
getRelated()
Returns an iterator over all out nodes of out edges and in nodes of in edges.
|
void |
remove(Edge e)
Removes the edge from both the in and out adjacency lists.
|
void |
removeIn(DirectedEdge e)
Removes an edge from the in adjacency list of the node.
|
void |
removeOut(DirectedEdge e)
Removes an edge from the out adjacency list of node.
|
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisited, toStringpublic void add(Edge e)
add in interface Nodee - Adjacent edge to add.DirectedNode.addIn(DirectedEdge),
DirectedNode.addOut(DirectedEdge)public void addIn(DirectedEdge e)
addIn in interface DirectedNodee - A directed edge that terminates at the node.DirectedNode.addIn(DirectedEdge),
DirectedEdge.getOutNode()public void addOut(DirectedEdge e)
addOut in interface DirectedNodee - A directed edge that originates from the node.DirectedNode.addOut(DirectedEdge),
DirectedEdge.getInNode()public void remove(Edge e)
remove in interface Nodee - Adjacent edge to remove.Node.remove(Edge)public void removeIn(DirectedEdge e)
DirectedNoderemoveIn in interface DirectedNodee - A directed edge that terminates at the node.DirectedNode.removeIn(DirectedEdge)public void removeOut(DirectedEdge e)
DirectedNoderemoveOut in interface DirectedNodee - A directed edge that originates from the node.DirectedNode.removeOut(DirectedEdge)public Edge getEdge(Node other)
getEdge in interface Nodeother - The other node that the desired edge to return is adjacent to.Node.remove(Edge)public Edge getInEdge(DirectedNode other)
DirectedNodegetInEdge in interface DirectedNodeother - The originating node.DirectedNode.getInEdge(DirectedNode)public Edge getOutEdge(DirectedNode other)
DirectedNodegetOutEdge in interface DirectedNodeother - The terminating node.DirectedNode.getOutEdge(DirectedNode)public List<DirectedEdge> getEdges()
public List<DirectedEdge> getInEdges()
DirectedNodegetInEdges in interface DirectedNodeDirectedNode.getInEdges()public List<DirectedEdge> getOutEdges()
DirectedNodegetOutEdges in interface DirectedNodeDirectedNode.getOutEdges()public List<DirectedEdge> getEdges(Node other)
getEdges in interface Nodeother - The other node that the desired edges to return are adjacent to.Node.getEdges(Node),
DirectedNode.getInEdges(DirectedNode),
DirectedNode.getOutEdges(DirectedNode)public List<DirectedEdge> getInEdges(DirectedNode other)
DirectedNodegetInEdges in interface DirectedNodeother - The originating node.DirectedNode.getInEdges(DirectedNode)public List<DirectedEdge> getOutEdges(DirectedNode other)
DirectedNodegetOutEdges in interface DirectedNodeother - The temimnating node.DirectedNode.getOutEdges(DirectedNode)public int getDegree()
getDegree in interface NodeNode.getDegree()public int getInDegree()
DirectedNodegetInDegree in interface DirectedNodeDirectedNode.getInDegree()public int getOutDegree()
DirectedNodegetOutDegree in interface DirectedNodeDirectedNode.getOutDegree()public Iterator<DirectedNode> getRelated()
getRelated in interface GraphableGraphable.getRelated()public Iterator<DirectedNode> getInRelated()
getInRelated in interface DirectedGraphableDirectedGraphable.getInRelated()public Iterator<DirectedNode> getOutRelated()
getOutRelated in interface DirectedGraphableDirectedGraphable.getOutRelated()Copyright © 1996–2021 Geotools. All rights reserved.