prefuse.data
Interface Node<N extends Node<N,E>,E extends Edge<N,E>>

All Superinterfaces:
Tuple<N>
All Known Subinterfaces:
NodeItem<N,E>
All Known Implementing Classes:
TableNode, TableNodeItem

public interface Node<N extends Node<N,E>,E extends Edge<N,E>>
extends Tuple<N>

Tuple sub-interface that represents a node in a graph or tree structure. This interface supports both graph and tree methods, tree methods invoked on a node in a general graph typically default to operations on the graph's generated spanning tree.

Author:
jeffrey heer

Method Summary
 java.util.List<E> childEdges()
          Get an iterator over the edges from this node to its tree children.
 java.util.List<N> children()
          Get an iterator over this node's tree children.
 java.util.List<E> edges()
          Get an iterator over all incident edges, those for which this node is either the source or the target.
 int getDegree()
          Get the degree of the node, the number of edges for which this node is either the source or the target.
 int getDepth()
          Get the tree depth of this node.
 int getInDegree()
          Get the in-degree of the node, the number of edges for which this node is the target.
 N getNextSibling()
          Get this node's next tree sibling.
 int getOutDegree()
          Get the out-degree of the node, the number of edges for which this node is the source.
 N getParent()
          Get the parent node of this node in a tree structure.
 E getParentEdge()
          Get the edge between this node and its parent node in a tree structure.
 N getPreviousSibling()
          Get this node's previous tree sibling.
 java.util.List<E> inEdges()
          Get an iterator over all incoming edges, those for which this node is the target.
 java.util.List<N> inNeighbors()
          Get an iterator over all adjacent nodes connected to this node by an incoming edge (i.e., all nodes that "point" at this one).
 java.util.List<N> neighbors()
          Get an iterator over all nodes connected to this node.
 java.util.List<E> outEdges()
          Get an iterator over all outgoing edges, those for which this node is the source.
 java.util.List<N> outNeighbors()
          Get an iterator over all adjacent nodes connected to this node by an outgoing edge (i.e., all nodes "pointed" to by this one).
 
Methods inherited from interface prefuse.data.Tuple
canGet, canGetBoolean, canGetDate, canGetDouble, canGetFloat, canGetInt, canGetLong, canGetString, canSet, canSetBoolean, canSetDate, canSetDouble, canSetFloat, canSetInt, canSetLong, canSetString, get, get, getBoolean, getBoolean, getColumnCount, getColumnIndex, getColumnName, getColumnType, getColumnType, getDate, getDate, getDefault, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getRow, getSchema, getString, getString, getTable, init, invalidate, isValid, revertToDefault, set, set, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setString, setString
 

Method Detail

getInDegree

int getInDegree()
Get the in-degree of the node, the number of edges for which this node is the target.

Returns:
the in-degree of the node

getOutDegree

int getOutDegree()
Get the out-degree of the node, the number of edges for which this node is the source.

Returns:
the out-degree of the node

getDegree

int getDegree()
Get the degree of the node, the number of edges for which this node is either the source or the target.

Returns:
the total degree of the node

inEdges

java.util.List<E> inEdges()
Get an iterator over all incoming edges, those for which this node is the target.

Returns:
an Iterator over all incoming edges

outEdges

java.util.List<E> outEdges()
Get an iterator over all outgoing edges, those for which this node is the source.

Returns:
an Iterator over all outgoing edges

edges

java.util.List<E> edges()
Get an iterator over all incident edges, those for which this node is either the source or the target.

Returns:
an Iterator over all incident edges

inNeighbors

java.util.List<N> inNeighbors()
Get an iterator over all adjacent nodes connected to this node by an incoming edge (i.e., all nodes that "point" at this one).

Returns:
an Iterator over all neighbors with in-links on this node

outNeighbors

java.util.List<N> outNeighbors()
Get an iterator over all adjacent nodes connected to this node by an outgoing edge (i.e., all nodes "pointed" to by this one).

Returns:
an Iterator over all neighbors with out-links from this node

neighbors

java.util.List<N> neighbors()
Get an iterator over all nodes connected to this node.

Returns:
an Iterator over all neighbors of this node

getParent

N getParent()
Get the parent node of this node in a tree structure.

Returns:
this node's parent node, or null if there is none.

getParentEdge

E getParentEdge()
Get the edge between this node and its parent node in a tree structure.

Returns:
the edge between this node and its parent

getDepth

int getDepth()
Get the tree depth of this node.

Returns:
the tree depth of this node. The root's tree depth is zero, and each level of the tree is one depth level greater.

getPreviousSibling

N getPreviousSibling()
Get this node's previous tree sibling.

Returns:
the previous sibling, or null if none

getNextSibling

N getNextSibling()
Get this node's next tree sibling.

Returns:
the next sibling, or null if none

children

java.util.List<N> children()
Get an iterator over this node's tree children.

Returns:
an iterator over this node's children

childEdges

java.util.List<E> childEdges()
Get an iterator over the edges from this node to its tree children.

Returns:
an iterator over the edges to the child nodes


Copyright © 2008 Regents of the University of California