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 |
getEdges()
Returns the combination of both the in and out adjacecy lists.
|
List |
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 |
getInEdges()
Returns the in adjacency list of the node.
|
List |
getInEdges(DirectedNode other)
Returns all edges that terminate at the node and originate from a specified node.
|
Iterator |
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 |
getOutEdges()
Returns the out adjacency list of the node.
|
List |
getOutEdges(DirectedNode other)
Returns all edges that originate at the node and terminate from at specified node.
|
Iterator |
getOutRelated()
Returns all out nodes of out edges.
|
Iterator |
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, toString
public void add(Edge e)
add
in interface Node
e
- Adjacent edge to add.UnsupportedOperationException
DirectedNode.addIn(DirectedEdge)
,
DirectedNode.addOut(DirectedEdge)
public void addIn(DirectedEdge e)
addIn
in interface DirectedNode
e
- A directed edge that terminates at the node.DirectedNode.addIn(DirectedEdge)
,
DirectedEdge.getOutNode()
public void addOut(DirectedEdge e)
addOut
in interface DirectedNode
e
- A directed edge that originates from the node.DirectedNode.addOut(DirectedEdge)
,
DirectedEdge.getInNode()
public void remove(Edge e)
remove
in interface Node
e
- Adjacent edge to remove.Node.remove(Edge)
public void removeIn(DirectedEdge e)
DirectedNode
removeIn
in interface DirectedNode
e
- A directed edge that terminates at the node.DirectedNode.removeIn(DirectedEdge)
public void removeOut(DirectedEdge e)
DirectedNode
removeOut
in interface DirectedNode
e
- A directed edge that originates from the node.DirectedNode.removeOut(DirectedEdge)
public Edge getEdge(Node other)
getEdge
in interface Node
other
- The other node that the desired edge to return is adjacent to.Node.remove(Edge)
public Edge getInEdge(DirectedNode other)
DirectedNode
getInEdge
in interface DirectedNode
other
- The originating node.DirectedNode.getInEdge(DirectedNode)
public Edge getOutEdge(DirectedNode other)
DirectedNode
getOutEdge
in interface DirectedNode
other
- The terminating node.DirectedNode.getOutEdge(DirectedNode)
public List getEdges()
public List getInEdges()
DirectedNode
getInEdges
in interface DirectedNode
DirectedNode.getInEdges()
public List getOutEdges()
DirectedNode
getOutEdges
in interface DirectedNode
DirectedNode.getOutEdges()
public List getEdges(Node other)
getEdges
in interface Node
other
- The other node that the desired edges to return are adjacent to.Node.getEdges(Node)
,
DirectedNode.getInEdges(DirectedNode)
,
DirectedNode.getOutEdges(DirectedNode)
public List getInEdges(DirectedNode other)
DirectedNode
getInEdges
in interface DirectedNode
other
- The originating node.DirectedNode.getInEdges(DirectedNode)
public List getOutEdges(DirectedNode other)
DirectedNode
getOutEdges
in interface DirectedNode
other
- The temimnating node.DirectedNode.getOutEdges(DirectedNode)
public int getDegree()
getDegree
in interface Node
Node.getDegree()
public int getInDegree()
DirectedNode
getInDegree
in interface DirectedNode
DirectedNode.getInDegree()
public int getOutDegree()
DirectedNode
getOutDegree
in interface DirectedNode
DirectedNode.getOutDegree()
public Iterator getRelated()
getRelated
in interface Graphable
Graphable.getRelated()
public Iterator getInRelated()
getInRelated
in interface DirectedGraphable
DirectedGraphable.getInRelated()
public Iterator getOutRelated()
getOutRelated
in interface DirectedGraphable
DirectedGraphable.getOutRelated()
Copyright © 1996–2019 Geotools. All rights reserved.