public class AdjacencyListNode extends AbstractNode
AdjacencyListGraph
AbstractElement.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, iterator
addAttribute, 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, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttribute, 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
public int getDegree()
Node
getDegree
in interface Node
getDegree
in class AbstractNode
public int getInDegree()
Node
getInDegree
in interface Node
getInDegree
in class AbstractNode
public int getOutDegree()
Node
getOutDegree
in interface Node
getOutDegree
in class AbstractNode
public <T extends Edge> T 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.
getEdge
in interface Node
getEdge
in class AbstractNode
i
- Index of the edge.public <T extends Edge> T 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.
getEnteringEdge
in interface Node
getEnteringEdge
in class AbstractNode
i
- Index of the edge.public <T extends Edge> T 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.
getLeavingEdge
in interface Node
getLeavingEdge
in class AbstractNode
i
- Index of the edge.public <T extends Edge> T 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.
getEdgeBetween
in interface Node
getEdgeBetween
in class AbstractNode
node
- The opposite node.public <T extends Edge> T 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.
getEdgeFrom
in interface Node
getEdgeFrom
in class AbstractNode
node
- The source node.public <T extends Edge> T 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.
getEdgeToward
in interface Node
getEdgeToward
in class AbstractNode
node
- The target node.public <T extends Edge> Iterator<T> getEdgeIterator()
Node
This 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 Node
getEdgeIterator
in class AbstractNode
public <T extends Edge> Iterator<T> getEnteringEdgeIterator()
Node
This 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 Node
getEnteringEdgeIterator
in class AbstractNode
public <T extends Edge> Iterator<T> getLeavingEdgeIterator()
Node
This 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 Node
getLeavingEdgeIterator
in class AbstractNode
Copyright © 2015. All rights reserved.