|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.graph.implementations.AbstractElement
org.graphstream.graph.implementations.AbstractNode
org.graphstream.graph.implementations.AdjacencyListNode
public class AdjacencyListNode
Nodes used with AdjacencyListGraph
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.graphstream.graph.implementations.AbstractElement |
---|
AbstractElement.AttributeChangeEvent |
Method Summary | ||
---|---|---|
int |
getDegree()
Total number of relations with other nodes or this node. |
|
|
getEdge(int i)
I-th edge. |
|
|
getEdgeBetween(Node node)
Retrieves an edge between this node and and another node if one exists. |
|
|
getEdgeFrom(Node node)
Retrieves an edge that leaves given node toward this node. |
|
|
getEdgeIterator()
Iterator on the set of connected edges. |
|
|
getEdgeToward(Node node)
Retrieves an edge that leaves this node toward another node. |
|
|
getEnteringEdge(int i)
I-th entering edge. |
|
|
getEnteringEdgeIterator()
Iterator only on leaving edges. |
|
int |
getInDegree()
Number of entering edges. |
|
|
getLeavingEdge(int i)
I-th leaving edge. |
|
|
getLeavingEdgeIterator()
Iterator only on entering edges. |
|
int |
getOutDegree()
Number of leaving edges. |
Methods inherited from class org.graphstream.graph.implementations.AbstractNode |
---|
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 |
Methods inherited from class org.graphstream.graph.implementations.AbstractElement |
---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.graphstream.graph.Node |
---|
toString |
Methods inherited from interface org.graphstream.graph.Element |
---|
addAttribute, addAttributes, changeAttribute, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getLabel, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, removeAttribute, setAttribute |
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |