public class AdjacencyListNode extends AbstractNode
AdjacencyListGraphAbstractElement.AttributeChangeEvent| Modifier and Type | Method and Description |
|---|---|
int |
getDegree()
Total number of relations with other nodes or this node.
|
<T extends Edge> |
getEdge(int i)
I-th edge.
|
<T extends Edge> |
getEdgeBetween(Node node)
Retrieves an edge between this node and and another node if one exists.
|
<T extends Edge> |
getEdgeFrom(Node node)
Retrieves an edge that leaves given node toward this node.
|
<T extends Edge> |
getEdgeIterator()
Iterator on the set of connected edges.
|
<T extends Edge> |
getEdgeToward(Node node)
Retrieves an edge that leaves this node toward another node.
|
<T extends Edge> |
getEnteringEdge(int i)
I-th entering edge.
|
<T extends Edge> |
getEnteringEdgeIterator()
Iterator only on leaving edges.
|
int |
getInDegree()
Number of entering edges.
|
<T extends Edge> |
getLeavingEdge(int i)
I-th leaving edge.
|
<T extends Edge> |
getLeavingEdgeIterator()
Iterator only on entering edges.
|
int |
getOutDegree()
Number of leaving edges.
|
getBreadthFirstIterator, getBreadthFirstIterator, getDepthFirstIterator, getDepthFirstIterator, getEachEdge, getEachEnteringEdge, getEachLeavingEdge, getEdgeBetween, getEdgeBetween, getEdgeFrom, getEdgeFrom, getEdgeSet, getEdgeToward, getEdgeToward, getEnteringEdgeSet, getGraph, getLeavingEdgeSet, getNeighborNodeIterator, hasEdgeBetween, hasEdgeBetween, hasEdgeBetween, hasEdgeFrom, hasEdgeFrom, hasEdgeFrom, hasEdgeToward, hasEdgeToward, hasEdgeToward, isEnteringEdge, isIncidentEdge, isLeavingEdge, iteratoraddAttribute, addAttributes, changeAttribute, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getEachAttributeKey, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getLabel, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, removeAttribute, setAttribute, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAttribute, addAttributes, changeAttribute, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getEachAttributeKey, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getLabel, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, removeAttribute, setAttributepublic int getDegree()
NodegetDegree in interface NodegetDegree in class AbstractNodepublic int getInDegree()
NodegetInDegree in interface NodegetInDegree in class AbstractNodepublic int getOutDegree()
NodegetOutDegree in interface NodegetOutDegree in class AbstractNodepublic <T extends Edge> T 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.
getEdge in interface NodegetEdge in class AbstractNodei - Index of the edge.public <T extends Edge> T 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.
getEnteringEdge in interface NodegetEnteringEdge in class AbstractNodei - Index of the edge.public <T extends Edge> T 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.
getLeavingEdge in interface NodegetLeavingEdge in class AbstractNodei - Index of the edge.public <T extends Edge> T 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.
getEdgeBetween in interface NodegetEdgeBetween in class AbstractNodenode - The opposite node.public <T extends Edge> T 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.
getEdgeFrom in interface NodegetEdgeFrom in class AbstractNodenode - The source node.public <T extends Edge> T 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.
getEdgeToward in interface NodegetEdgeToward in class AbstractNodenode - The target node.public <T extends Edge> Iterator<T> getEdgeIterator()
NodeThis iterator iterates on all edges leaving and entering (this includes any non-directed edge present, and a non-directed edge is only iterated once).
This method is implicitly generic and return an Iterator over something which extends Edge. The return type is the one of the left part of the assignment. For example, in the following call :
Iterator<ExtendedEdge> ite = node.getEdgeIterator();the method will return an Iterator<ExtendedEdge>. If no left part exists, method will just return an Iterator<Edge>.
getEdgeIterator in interface NodegetEdgeIterator in class AbstractNodepublic <T extends Edge> Iterator<T> getEnteringEdgeIterator()
NodeThis iterator iterates only on directed edges going from this node to others (non-directed edges are included in the iteration).
This method is implicitly generic and return an Iterator over something which extends Edge. The return type is the one of the left part of the assignment. For example, in the following call :
Iterator<ExtendedEdge> ite = node.getEnteringEdgeIterator();the method will return an Iterator<ExtendedEdge>. If no left part exists, method will just return an Iterator<Edge>.
getEnteringEdgeIterator in interface NodegetEnteringEdgeIterator in class AbstractNodepublic <T extends Edge> Iterator<T> getLeavingEdgeIterator()
NodeThis iterator iterates only on directed edges going from other nodes toward this node (non-directed edges are included in the iteration).
This method is implicitly generic and return an Iterator over something which extends Edge. The return type is the one of the left part of the assignment. For example, in the following call :
Iterator<ExtendedEdge> ite = node.getLeavingEdgeIterator();the method will return an Iterator<ExtendedEdge>. If no left part exists, method will just return an Iterator<Edge>.
getLeavingEdgeIterator in interface NodegetLeavingEdgeIterator in class AbstractNodeCopyright © 2015. All rights reserved.