org.graffiti.graph
Interface Node

All Superinterfaces:
Attributable, GraphElement
All Known Implementing Classes:
AbstractNode, AdjListNode, FastNode

public interface Node
extends GraphElement

Provides an interfaces for a graph node. All directed edges whose source is the current Node are regarded as outgoing edges. Ingoing edges are those directed edges whose target is the current Node. Undirected edges are regarded separately since a Graph can have both directed and indirected edges.

Version:
$Revision: 5767 $
See Also:
Edge, GraphElement, Graph

Method Summary
 Collection<Edge> getAllInEdges()
          Union of getDirectedInEdges() and getUndirectedEdges() .
 Collection<Node> getAllInNeighbors()
          Union of getInNeighbors() and getUndirectedNeighbors() .
 Collection<Edge> getAllOutEdges()
          Union of getDirectedOutEdges() and getUndirectedEdges() .
 Collection<Node> getAllOutNeighbors()
          Union of getOutNeighbors() and getUndirectedNeighbors().
 Collection<Edge> getDirectedInEdges()
          Returns a collection containing the directed ingoing edges of the Node.
 Iterator<Edge> getDirectedInEdgesIterator()
          Returns an iterator containing the directed ingoing edges of the Node.
 Collection<Edge> getDirectedOutEdges()
          Returns a collection containing the outgoing directed edges of the Node.
 Iterator<Edge> getDirectedOutEdgesIterator()
          Returns an iterator containing the outgoing directed edges of the Node.
 Collection<Edge> getEdges()
          Returns a collection containing all the ingoing and outgoing directed and undirected edges of the current Node.
 Iterator<Edge> getEdgesIterator()
          Returns an iterator containing all the ingoing and outgoing directed and undirected edges of the current Node.
 int getInDegree()
          Returns the in-degree of the current Node.
 Collection<Node> getInNeighbors()
          Returns a collection containing the neighbor nodes belonging to incoming edges.
 Iterator<Node> getInNeighborsIterator()
          Returns an iterator over the neighbor nodes belonging to incoming edges.
 Collection<Node> getNeighbors()
          Returns a collection containing all the neighbor nodes of the current Node.
 Iterator<Node> getNeighborsIterator()
          Returns an interator over the neighbor nodes of the current Node.
 int getOutDegree()
          Returns the out-degree of the current Node.
 Collection<Node> getOutNeighbors()
          Returns a collection containing all the neighbors of the current Node which are connected by an outgoing Edge.
 Iterator<Node> getOutNeighborsIterator()
          Returns an iterator containing all the neighbors of the current Node which are connected by an outgoing Edge.
 Collection<Edge> getUndirectedEdges()
          Returns a collection containing the undirected ingoing and outgoing edges of the Node.
 Iterator<Edge> getUndirectedEdgesIterator()
          Returns an iterator containing all undirected edges of the Node.
 Collection<Node> getUndirectedNeighbors()
          Returns a collection containing all the neighbors which are connected to the current Node by an undirected Edge.
 
Methods inherited from interface org.graffiti.graph.GraphElement
getGraph, remove
 
Methods inherited from interface org.graffiti.attributes.Attributable
addAttribute, addBoolean, addByte, addDouble, addFloat, addInteger, addLong, addShort, addString, changeBoolean, changeByte, changeDouble, changeFloat, changeInteger, changeLong, changeShort, changeString, containsAttribute, getAttribute, getAttributes, getBoolean, getByte, getDouble, getFloat, getInteger, getListenerManager, getLong, getShort, getString, removeAttribute, setBoolean, setByte, setDouble, setFloat, setInteger, setLong, setShort, setString
 

Method Detail

getAllInEdges

Collection<Edge> getAllInEdges()
Union of getDirectedInEdges() and getUndirectedEdges() .

Returns:
Collection

getAllInNeighbors

Collection<Node> getAllInNeighbors()
Union of getInNeighbors() and getUndirectedNeighbors() .

Returns:
Collection

getAllOutEdges

Collection<Edge> getAllOutEdges()
Union of getDirectedOutEdges() and getUndirectedEdges() .

Returns:
Collection

getAllOutNeighbors

Collection<Node> getAllOutNeighbors()
Union of getOutNeighbors() and getUndirectedNeighbors().

Returns:
Collection

getDirectedInEdges

Collection<Edge> getDirectedInEdges()
Returns a collection containing the directed ingoing edges of the Node.

Returns:
a collection containing the directed ingoing edges of the Node.

getDirectedInEdgesIterator

Iterator<Edge> getDirectedInEdgesIterator()
Returns an iterator containing the directed ingoing edges of the Node.

Returns:
an iterator containing the directed ingoing edges of the Node.

getDirectedOutEdges

Collection<Edge> getDirectedOutEdges()
Returns a collection containing the outgoing directed edges of the Node.

Returns:
a collection containing the outgoing directed edges of the Node.

getDirectedOutEdgesIterator

Iterator<Edge> getDirectedOutEdgesIterator()
Returns an iterator containing the outgoing directed edges of the Node.

Returns:
an iterator containing the outgoing directed edges of the Node.

getEdges

Collection<Edge> getEdges()
Returns a collection containing all the ingoing and outgoing directed and undirected edges of the current Node. Ingoing and outgoing edges will not be separated and there will be no ordering on the collection.

Returns:
a collection containing all ingoing and outgoing directed and undirected edges of the current Node.

getEdgesIterator

Iterator<Edge> getEdgesIterator()
Returns an iterator containing all the ingoing and outgoing directed and undirected edges of the current Node. Ingoing and outgoing edges will not be separated and there will be no ordering on the collection.

Returns:
an iterator containing all ingoing and outgoing directed and undirected edges of the current Node.

getInDegree

int getInDegree()
Returns the in-degree of the current Node. The in-degree is defined as the number of ingoing, directed edges plus the number of undirected edges.

Returns:
the in-degree of the current Node.

getInNeighbors

Collection<Node> getInNeighbors()
Returns a collection containing the neighbor nodes belonging to incoming edges. Note that the number of Elements returned by this function might be less than the number returned by getInDegree(), due to the fact that multiple edges between the same two nodes are possible but the corresponding Node is only inserted once.

Returns:
a collection containing the neighbor nodes belonging to incoming edges.

getInNeighborsIterator

Iterator<Node> getInNeighborsIterator()
Returns an iterator over the neighbor nodes belonging to incoming edges.

Returns:
a Iterator over the neighbor nodes belonging to incoming edges.

getNeighbors

Collection<Node> getNeighbors()
Returns a collection containing all the neighbor nodes of the current Node. A neighbor Node is either the source or the target of either an ingoing or an outgoing or an undirected Edge.

Returns:
a collection containing all the neighbor nodes of the current Node.

getNeighborsIterator

Iterator<Node> getNeighborsIterator()
Returns an interator over the neighbor nodes of the current Node. A neighbor Node is either the source or the target of either an ingoing or outgoing or undirected Edge.

Returns:
an iterator over the neighbor nodes of the current Node.

getOutDegree

int getOutDegree()
Returns the out-degree of the current Node. The out-degree is defined as the number of outgoing, directed edges plus the number of undirected edges.

Returns:
the out-degree of the current Node.

getOutNeighbors

Collection<Node> getOutNeighbors()
Returns a collection containing all the neighbors of the current Node which are connected by an outgoing Edge. Note that the number of elements returned by this function might be less than the number returned by getOutDegree(), due to the fact that multiple edges between the same two nodes are possible but the corresponding Node is only inserted once.

Returns:
a collection containing all the neighbor nodes of the current Node connected by an outgoing Edge.

getOutNeighborsIterator

Iterator<Node> getOutNeighborsIterator()
Returns an iterator containing all the neighbors of the current Node which are connected by an outgoing Edge.

Returns:
an iterator containing all the neighbor Nodes of the current Node connected by an outgoing Edge.

getUndirectedEdges

Collection<Edge> getUndirectedEdges()
Returns a collection containing the undirected ingoing and outgoing edges of the Node.

Returns:
a collection containing the undirected ingoing and outgoing edges of the Node.

getUndirectedEdgesIterator

Iterator<Edge> getUndirectedEdgesIterator()
Returns an iterator containing all undirected edges of the Node.

Returns:
an iterator containing all undirected edges of the Node.

getUndirectedNeighbors

Collection<Node> getUndirectedNeighbors()
Returns a collection containing all the neighbors which are connected to the current Node by an undirected Edge.

Returns:
a collection containing all the neighbors which are connected to the current Node by an undirected Edge.


Generated at 2012-05-30 11:00:36 PM CEST