View Javadoc

1   // Union.java, created Jun 29, 2004 1:32:45 PM 2004 by jwhaley
2   // Copyright (C) 2004 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package net.sf.bddbddb.ir.highlevel;
5   
6   import net.sf.bddbddb.Relation;
7   import net.sf.bddbddb.ir.Operation;
8   import net.sf.javabdd.BDDFactory;
9   import net.sf.javabdd.BDDFactory.BDDOp;
10  
11  /***
12   * Union
13   * 
14   * @author jwhaley
15   * @version $Id: Union.java 328 2004-10-16 02:45:30Z joewhaley $
16   */
17  public class Union extends BooleanOperation {
18      /***
19       * @param r0
20       * @param r1
21       * @param r2
22       */
23      public Union(Relation r0, Relation r1, Relation r2) {
24          super(r0, r1, r2);
25      }
26  
27      /*
28       * (non-Javadoc)
29       * 
30       * @see net.sf.bddbddb.ir.BooleanOperation#getName()
31       */
32      public String getName() {
33          return "union";
34      }
35  
36      /*
37       * (non-Javadoc)
38       * 
39       * @see net.sf.bddbddb.ir.Operation#visit(net.sf.bddbddb.ir.HighLevelOperationVisitor)
40       */
41      public Object visit(HighLevelOperationVisitor i) {
42          return i.visit(this);
43      }
44  
45      /*
46       * (non-Javadoc)
47       * 
48       * @see net.sf.bddbddb.ir.highlevel.BooleanOperation#getBDDOp()
49       */
50      public BDDOp getBDDOp() {
51          return BDDFactory.or;
52      }
53  
54      public Operation copy() {
55          return new Union(r0, r1, r2);
56      }
57  }