public class OptDirectedNode extends OptGraphable implements DirectedNode
DirectedNode
,
Serialized FormModifier and Type | Class and Description |
---|---|
class |
OptDirectedNode.RelatedIterator
Iterator used to iterate over related nodes.
|
Constructor and Description |
---|
OptDirectedNode()
Constructs a new OptDirectedNode.
|
OptDirectedNode(int indegree,
int outdegree)
Constructs a new OptDirectedNode.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Edge e)
Not supported.
|
void |
addIn(DirectedEdge e)
Adds an edge to the in adjacency list of the node.
|
void |
addOut(DirectedEdge e)
Adds an edge to the out 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<DirectedEdge> |
getEdges()
Returns the edge adjacency list of the node.
|
List<Edge> |
getEdges(Node other)
Returns a collection of edges in the adjacency list of the node that are adjacent to another
specified 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.
|
DirectedEdge[] |
getInEdgeArray()
Returns the in adjacency edge array of the node.
|
List<DirectedEdge> |
getInEdges()
Returns the in adjacency list of the node.
|
List<Edge> |
getInEdges(DirectedNode other)
Returns all edges that terminate at the node and originate from a specified node.
|
Iterator<Node> |
getInRelated()
This iterator iterates over the underlying in edge array of the node.
|
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.
|
DirectedEdge[] |
getOutEdgeArray()
Returns the out adjacency edge array of the node.
|
List<DirectedEdge> |
getOutEdges()
Returns the out adjacency list of the node.
|
List<Edge> |
getOutEdges(DirectedNode other)
Returns all edges that originate at the node and terminate from at specified node.
|
Iterator<Node> |
getOutRelated()
This iterator iterates over the underlying out edge array of the node.
|
Iterator<Node> |
getRelated()
This iterator iterates over the underlying edge arrays of the node.
|
void |
remove(Edge e)
Unsupported Operation.
|
void |
removeIn(DirectedEdge e)
Unsupported Operation.
|
void |
removeOut(DirectedEdge e)
Unsupported Operation.
|
void |
setInDegree(int indegree)
Sets the in degree of the node.
|
void |
setOutDegree(int outdegree)
Sets the out degree of the node.
|
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisited
public OptDirectedNode()
public OptDirectedNode(int indegree, int outdegree)
indegree
- Number of in adjacenct edges to the node.outdegree
- Number of out adjacent edges to the node.public void add(Edge e)
public void addIn(DirectedEdge e)
DirectedNode
addIn
in interface DirectedNode
e
- A directed edge that terminates at the node.DirectedNode.addIn(DirectedEdge)
public void addOut(DirectedEdge e)
DirectedNode
addOut
in interface DirectedNode
e
- A directed edge that originates from the node.DirectedNode.addOut(DirectedEdge)
public void remove(Edge e)
public void removeIn(DirectedEdge e)
removeIn
in interface DirectedNode
e
- A directed edge that terminates at the node.Node.remove(Edge)
public void removeOut(DirectedEdge e)
removeOut
in interface DirectedNode
e
- A directed edge that originates from the node.Node.remove(Edge)
public Edge getEdge(Node other)
Node
getEdge
in interface Node
other
- The other node that the desired edge to return is adjacent to.Node.getEdge(Node)
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<Edge> getEdges(Node other)
Node
getEdges
in interface Node
other
- The other node that the desired edges to return are adjacent to.Node.getEdges(Node)
public List<Edge> getInEdges(DirectedNode other)
DirectedNode
getInEdges
in interface DirectedNode
other
- The originating node.DirectedNode.getInEdges(DirectedNode)
public List<Edge> getOutEdges(DirectedNode other)
DirectedNode
getOutEdges
in interface DirectedNode
other
- The temimnating node.DirectedNode.getOutEdges(DirectedNode)
public List<DirectedEdge> getEdges()
Node
getEdges
in interface Node
Node.getEdges()
public DirectedEdge[] getInEdgeArray()
public List<DirectedEdge> getInEdges()
DirectedNode
getInEdges
in interface DirectedNode
DirectedNode.getInEdges()
public DirectedEdge[] getOutEdgeArray()
public List<DirectedEdge> getOutEdges()
DirectedNode
getOutEdges
in interface DirectedNode
DirectedNode.getOutEdges()
public int getDegree()
Node
getDegree
in interface Node
Node.getDegree()
public void setInDegree(int indegree)
indegree
- The in degree / size of in edge array of the node.public int getInDegree()
DirectedNode
getInDegree
in interface DirectedNode
DirectedNode.getInDegree()
public void setOutDegree(int outdegree)
outdegree
- The out degree / size of out edge array of the node.public int getOutDegree()
DirectedNode
getOutDegree
in interface DirectedNode
DirectedNode.getOutDegree()
public Iterator<Node> getRelated()
getRelated
in interface Graphable
Graphable.getRelated()
public Iterator<Node> getInRelated()
getInRelated
in interface DirectedGraphable
DirectedGraphable.getInRelated()
public Iterator<Node> getOutRelated()
getOutRelated
in interface DirectedGraphable
Graphable.getRelated()
Copyright © 1996–2022 Geotools. All rights reserved.