org.gersteinlab.tyna.core.graph
Interface UndirectedGraph

All Superinterfaces:
Graph, java.io.Serializable
All Known Subinterfaces:
AdvancedUndirectedGraph
All Known Implementing Classes:
UndirectedMultiGraph, UndirectedSimpleGraph

public interface UndirectedGraph
extends Graph

        This interface declares that each implemented class is an undirected
        graph.
        

Version:
1.0 (September 20, 2005) Change History: 1.0 - Initial version
Author:
Kevin Yuk-Lap Yip

Method Summary
 int getDegree(Node node)
          Get the degree of a node.
 java.util.Map getDegrees()
          Get the degrees of all nodes in the graph.
 java.util.List getEdges(Node node)
          Get the edges incident on a node.
 java.util.Set getNeighbors(Node node)
          Get the neighbors of a node.
 
Methods inherited from interface org.gersteinlab.tyna.core.graph.Graph
addEdge, addNode, containsEdge, containsNode, getAttr, getAttrs, getEdgeCount, getEdgeIterator, getEdgeNodePairs, getNode, getNodeCount, getNodeIterator, setAttr
 

Method Detail

getDegree

int getDegree(Node node)
              throws java.lang.IllegalArgumentException
Get the degree of a node.

Parameters:
node - The node
Returns:
The degree of the node
Throws:
java.lang.IllegalArgumentException - If the node is not in the graph

getDegrees

java.util.Map getDegrees()
Get the degrees of all nodes in the graph.

Returns:
The degrees, in a map from Node to Integer

getEdges

java.util.List getEdges(Node node)
                        throws java.lang.IllegalArgumentException
Get the edges incident on a node.

Parameters:
node - The node
Returns:
The edges incident on the node
Throws:
java.lang.IllegalArgumentException - If the node is not in the graph

getNeighbors

java.util.Set getNeighbors(Node node)
                           throws java.lang.IllegalArgumentException
Get the neighbors of a node.

Parameters:
node - The node
Returns:
The neighbors of the node
Throws:
java.lang.IllegalArgumentException - If the node is not in the graph