public class AdjacencyListNode extends AbstractNode
AdjacencyListGraph
AbstractElement.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, isLeavingEdge
attributeKeys, clearAttributes, getAttribute, getAttribute, getAttributeCount, getFirstAttributeOf, getFirstAttributeOf, getId, getIndex, hasAttribute, hasAttribute, removeAttribute, setAttribute, toString
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasEdgeBetween, hasEdgeBetween, hasEdgeBetween, hasEdgeFrom, hasEdgeFrom, hasEdgeFrom, hasEdgeToward, hasEdgeToward, hasEdgeToward, iterator, neighborNodes, toString
attributeKeys, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getFirstAttributeOf, getFirstAttributeOf, getId, getIndex, getLabel, getMap, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasLabel, hasMap, hasNumber, hasVector, removeAttribute, setAttribute, setAttributes
public int getDegree()
Node
public int getInDegree()
Node
public int getOutDegree()
Node
public Edge getEdge(int i)
Node
However 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)
Node
However 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)
Node
However 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)
Node
This 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)
Node
This 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)
Node
This 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()
Node
public java.util.stream.Stream<Edge> enteringEdges()
Node