public class SingleNode extends AdjacencyListNode
SingleGraph
Modifier and Type | Class and Description |
---|---|
protected static class |
SingleNode.TwoEdges |
AdjacencyListNode.EdgeIterator<T extends Edge>
AbstractElement.AttributeChangeEvent
Modifier and Type | Field and Description |
---|---|
protected HashMap<AbstractNode,SingleNode.TwoEdges> |
neighborMap |
degree, edges, GROWTH_FACTOR, I_EDGE, INITIAL_EDGE_CAPACITY, IO_EDGE, ioStart, O_EDGE, oStart
graph
attributes, attributesBeingRemoved, id
Modifier | Constructor and Description |
---|---|
protected |
SingleNode(AbstractGraph graph,
String id) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addEdgeCallback(AbstractEdge edge)
This method is called automatically when an edge incident to this node is
created.
|
protected void |
clearCallback()
This method is called for each node when the graph is cleared.
|
<T extends Node> |
getNeighborNodeIterator()
This implementation uses
AbstractNode.getEdgeIterator() and stores the
visited nodes in a set. |
protected <T extends Edge> |
locateEdge(Node opposite,
char type) |
protected void |
removeEdge(int i) |
edgeType, getDegree, getEdge, getEdgeBetween, getEdgeFrom, getEdgeIterator, getEdgeToward, getEnteringEdge, getEnteringEdgeIterator, getInDegree, getLeavingEdge, getLeavingEdgeIterator, getOutDegree, removeEdgeCallback
attributeChanged, getBreadthFirstIterator, getBreadthFirstIterator, getDepthFirstIterator, getDepthFirstIterator, getEachEdge, getEachEnteringEdge, getEachLeavingEdge, getEdgeBetween, getEdgeBetween, getEdgeFrom, getEdgeFrom, getEdgeSet, getEdgeToward, getEdgeToward, getEnteringEdgeSet, getGraph, getLeavingEdgeSet, hasEdgeBetween, hasEdgeBetween, hasEdgeBetween, hasEdgeFrom, hasEdgeFrom, hasEdgeFrom, hasEdgeToward, hasEdgeToward, hasEdgeToward, isEnteringEdge, isIncidentEdge, isLeavingEdge, iterator, nullAttributesAreErrors
addAttribute, addAttributes, changeAttribute, clearAttributes, clearAttributesWithNoEvent, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getEachAttributeKey, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getLabel, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, removeAttribute, setAttribute, setIndex, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
forEach, spliterator
protected HashMap<AbstractNode,SingleNode.TwoEdges> neighborMap
protected SingleNode(AbstractGraph graph, String id)
protected <T extends Edge> T locateEdge(Node opposite, char type)
locateEdge
in class AdjacencyListNode
protected void removeEdge(int i)
removeEdge
in class AdjacencyListNode
protected boolean addEdgeCallback(AbstractEdge edge)
AbstractNode
addEdgeCallback
in class AdjacencyListNode
edge
- a new edge incident to this nodeprotected void clearCallback()
AbstractNode
clearCallback
in class AdjacencyListNode
public <T extends Node> Iterator<T> getNeighborNodeIterator()
AbstractNode
AbstractNode.getEdgeIterator()
and stores the
visited nodes in a set. In this way it ensures that each neighbor will be
visited exactly once, even in multi-graph.getNeighborNodeIterator
in interface Node
getNeighborNodeIterator
in class AbstractNode
Node.getNeighborNodeIterator()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses