org.gersteinlab.tyna.core.operators
Interface BinaryOperator

All Known Implementing Classes:
Difference, Intersection, Union

public interface BinaryOperator

        This class defines the interface for binary graph operators, which take
        two graphs as input, and returns a single graph as output.
        

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

Method Summary
 boolean associative()
          Whether the operator is associative, i.e., whether a op (b op c) equals (a op b) op c.
 boolean commutative()
          Whether the operator is commutative, i.e., whether a op b equals b op a.
 Graph operate(Graph g1, Graph g2)
          Perform the operation on two graphs.
 

Method Detail

operate

Graph operate(Graph g1,
              Graph g2)
              throws GraphTypeException
Perform the operation on two graphs.

Parameters:
g1 - The first graph
g2 - The second graph
Returns:
The resulting graph
Throws:
GraphTypeException - If there are problems with the types of the input graphs

associative

boolean associative()
Whether the operator is associative, i.e., whether a op (b op c) equals (a op b) op c.

Returns:
Whether the operator is associative

commutative

boolean commutative()
Whether the operator is commutative, i.e., whether a op b equals b op a.

Returns:
Whether the operator is commutative