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

All Superinterfaces:
Tuple<E>
All Known Subinterfaces:
EdgeItem<N,E>
All Known Implementing Classes:
TableEdge, TableEdgeItem

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

Tuple sub-interface that represents an edge in a graph structure. Each edge has both a source node and a target node. For directed edges, this distinction indicates the directionality of the edge. For undirected edges this distinction merely reflects the underlying storage of the nodes.

Author:
jeffrey heer

Method Summary
 N getAdjacentNode(N n)
          Given a Node upon which this Edge is incident, the opposite incident Node is returned.
 Graph<?,N,E> getGraph()
          Returns the graph of which this Edge is a member.
 N getSourceNode()
          Returns the first, or source, node upon which this Edge is incident.
 N getTargetNode()
          Returns the second, or target, node upon which this Edge is incident.
 boolean isDirected()
          Indicates if this edge is directed or undirected.
 
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

getGraph

Graph<?,N,E> getGraph()
Returns the graph of which this Edge is a member.

Returns:
the Graph containing this Edge

isDirected

boolean isDirected()
Indicates if this edge is directed or undirected.

Returns:
true if directed, false if undirected.

getSourceNode

N getSourceNode()
Returns the first, or source, node upon which this Edge is incident.

Returns:
the source Node

getTargetNode

N getTargetNode()
Returns the second, or target, node upon which this Edge is incident.

Returns:
the source Node

getAdjacentNode

N getAdjacentNode(N n)
Given a Node upon which this Edge is incident, the opposite incident Node is returned. Throws an exception if the input node is not incident on this Edge.

Parameters:
n - a Node upon which this Edge is incident
Returns:
the other Node touched by this Edge


Copyright © 2008 Regents of the University of California