org.gersteinlab.tyna.core.graph
Interface DirectedGraph

All Superinterfaces:
Graph, java.io.Serializable
All Known Subinterfaces:
AdvancedDirectedGraph
All Known Implementing Classes:
DirectedMultiGraph, DirectedSimpleGraph

public interface DirectedGraph
extends Graph

        This interface declares that each implemented class is a directed graph.
        

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

Method Summary
 int getInDegree(Node node)
          Get the in-degree of a node.
 java.util.Map getInDegrees()
          Get the in-degrees of all nodes in the graph.
 java.util.List getInEdges(Node node)
          Get the in-edges of a node.
 java.util.Set getInNeighbors(Node node)
          Get the in-neighbors of a node.
 int getOutDegree(Node node)
          Get the out-degree of a node.
 java.util.Map getOutDegrees()
          Get the out-degrees of all nodes in the graph.
 java.util.List getOutEdges(Node node)
          Get the out-edges of a node.
 java.util.Set getOutNeighbors(Node node)
          Get the out-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

getInDegree

int getInDegree(Node node)
                throws java.lang.IllegalArgumentException
Get the in-degree of a node.

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

getOutDegree

int getOutDegree(Node node)
                 throws java.lang.IllegalArgumentException
Get the out-degree of a node.

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

getInDegrees

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

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

getOutDegrees

java.util.Map getOutDegrees()
Get the out-degrees of all nodes in the graph.

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

getInEdges

java.util.List getInEdges(Node node)
                          throws java.lang.IllegalArgumentException
Get the in-edges of a node.

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

getOutEdges

java.util.List getOutEdges(Node node)
                           throws java.lang.IllegalArgumentException
Get the out-edges of a node.

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

getInNeighbors

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

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

getOutNeighbors

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

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