

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object org.gersteinlab.tyna.core.operators.Difference
public class Difference
This class defines the set difference binary operator. It takes two graphs as inputs, and produces a graph as outputs, according to the following rules: . The two graphs must be both directed or both undirected. . There is an edge in the resulting graph from a node n1 to a node n2 if and only if the first graph contains an edge from n1 to n2, but the second graph does not. . A node appears in the resulting graph if and only if either it is an end point of an edge that appears in the first graph but not the second, or a node that appears in the first graph but not the second. . No matter how many edges are there from n1 to n2 in the original graphs, there is at most one edge from n1 to n2 in the resulting graph.
Constructor Summary  

Difference()

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. 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public Difference()
Method Detail 

public Graph operate(Graph g1, Graph g2) throws GraphTypeException
BinaryOperator
operate
in interface BinaryOperator
g1
 The first graphg2
 The second graph
GraphTypeException
 If there are problems with the types of the input graphspublic boolean associative()
BinaryOperator
associative
in interface BinaryOperator
public boolean commutative()
BinaryOperator
commutative
in interface BinaryOperator


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 