public class AdjacencyListNode extends AbstractNode
AdjacencyListGraphAbstractElement.AttributeChangeEvent| Modifier and Type | Method and Description |
|---|---|
java.util.stream.Stream<Edge> |
edges()
Stream over all entering and leaving edges.
|
java.util.stream.Stream<Edge> |
enteringEdges()
Stream over all entering edges.
|
int |
getDegree()
Total number of relations with other nodes or this node.
|
Edge |
getEdge(int i)
I-th edge.
|
Edge |
getEdgeBetween(Node node)
Retrieves an edge between this node and and another node if one exists.
|
Edge |
getEdgeFrom(Node node)
Retrieves an edge that leaves given node toward this node.
|
Edge |
getEdgeToward(Node node)
Retrieves an edge that leaves this node toward another node.
|
Edge |
getEnteringEdge(int i)
I-th entering edge.
|
int |
getInDegree()
Number of entering edges.
|
Edge |
getLeavingEdge(int i)
I-th leaving edge.
|
int |
getOutDegree()
Number of leaving edges.
|
java.util.stream.Stream<Edge> |
leavingEdges()
Stream over all leaving edges.
|
getBreadthFirstIterator, getBreadthFirstIterator, getDepthFirstIterator, getDepthFirstIterator, getEdgeBetween, getEdgeBetween, getEdgeFrom, getEdgeFrom, getEdgeToward, getEdgeToward, getGraph, isEnteringEdge, isIncidentEdge, isLeavingEdgeattributeKeys, clearAttributes, getAttribute, getAttribute, getAttributeCount, getFirstAttributeOf, getFirstAttributeOf, getId, getIndex, hasAttribute, hasAttribute, removeAttribute, setAttribute, toStringequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasEdgeBetween, hasEdgeBetween, hasEdgeBetween, hasEdgeFrom, hasEdgeFrom, hasEdgeFrom, hasEdgeToward, hasEdgeToward, hasEdgeToward, iterator, neighborNodes, toStringattributeKeys, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getFirstAttributeOf, getFirstAttributeOf, getId, getIndex, getLabel, getMap, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasLabel, hasMap, hasNumber, hasVector, removeAttribute, setAttribute, setAttributespublic int getDegree()
Nodepublic int getInDegree()
Nodepublic int getOutDegree()
Nodepublic Edge getEdge(int i)
NodeHowever this method allows to iterate very quickly on all edges, or to choose a given edge with direct access.
This method is implicitly generic and return something which extends Edge. The return type is the one of the left part of the assignment. For example, in the following call :
ExtendedEdge e = node.getEdge(i);the method will return an ExtendedEdge. If no left part exists, method will just return an Edge.
i - Index of the edge.public Edge getEnteringEdge(int i)
NodeHowever this method allows to iterate very quickly on all entering edges, or to choose a given entering edge with direct access.
This method is implicitly generic and return something which extends Edge. The return type is the one of the left part of the assignment. For example, in the following call :
ExtendedEdge e = node.getEnteringEdge(i);the method will return an ExtendedEdge. If no left part exists, method will just return an Edge.
i - Index of the edge.public Edge getLeavingEdge(int i)
NodeHowever this method allows to iterate very quickly on all leaving edges, or to choose a given leaving edge with direct access.
This method is implicitly generic and return something which extends Edge. The return type is the one of the left part of the assignment. For example, in the following call :
ExtendedEdge e = node.getLeavingEdge(i);the method will return an ExtendedEdge. If no left part exists, method will just return an Edge.
i - Index of the edge.public Edge getEdgeBetween(Node node)
NodeThis method selects directed or undirected edges. If the edge is directed, its direction is not important and leaving or entering edges will be selected.
This method is implicitly generic and return something which extends Edge. The return type is the one of the left part of the assignment. For example, in the following call :
ExtendedEdge e = node.getEdgeBetween(...);the method will return an ExtendedEdge. If no left part exists, method will just return an Edge.
node - The opposite node.public Edge getEdgeFrom(Node node)
NodeThis method selects only edges leaving the other node an pointing at this node (this also selects undirected edges).
This method is implicitly generic and returns something which extends Edge. The return type is the one of the left part of the assignment. For example, in the following call :
ExtendedEdge e = node.getEdgeFrom(...);the method will return an ExtendedEdge. If no left part exists, method will just return an Edge.
node - The source node.public Edge getEdgeToward(Node node)
NodeThis method selects only edges leaving this node an pointing at the parameter node (this also selects undirected edges).
This method is implicitly generic and returns something which extends Edge. The return type is the one of the left part of the assignment. For example, in the following call :
ExtendedEdge e = node.getEdgeToward(...);the method will return an ExtendedEdge. If no left part exists, method will just return an Edge.
node - The target node.public java.util.stream.Stream<Edge> edges()
Nodepublic java.util.stream.Stream<Edge> enteringEdges()
Node