예제 #1
0
 public BinaryDecisionDiagram relativeProductTo(
     BinaryDecisionDiagram transitions, BinaryDecisionDiagram existsFromStateAndCharacter) {
   int oldId = id;
   this.id = bdd.relProd(id, transitions.id, existsFromStateAndCharacter.id);
   discard(oldId);
   return this;
 }
예제 #2
0
 public BinaryDecisionDiagram replaceTo(Permutation permutation) {
   int oldId = id;
   this.id = bdd.replace(id, permutation);
   discard(oldId);
   return this;
 }
예제 #3
0
 private void discard(int id) {
   bdd.deref(id);
 }
예제 #4
0
 public int[] oneSatisfyingAssignment(int[] buffer) {
   return bdd.oneSat(id, buffer);
 }
예제 #5
0
 public boolean isZero() {
   return id == bdd.getZero();
 }
예제 #6
0
 public BinaryDecisionDiagram and(
     BinaryDecisionDiagram binaryDecisionDiagram, BinaryDecisionDiagram buffer) {
   buffer.discard();
   buffer.id = bdd.ref(bdd.and(id, binaryDecisionDiagram.id));
   return buffer;
 }
예제 #7
0
 public void printSet() {
   bdd.printSet(id);
 }
예제 #8
0
 public BinaryDecisionDiagram orTo(BinaryDecisionDiagram binaryDecisionDiagram) {
   this.id = bdd.orTo(id, binaryDecisionDiagram.id);
   return this;
 }
예제 #9
0
 public BinaryDecisionDiagram not() {
   return new BinaryDecisionDiagram(bdd, bdd.not(id));
 }
예제 #10
0
 public static BinaryDecisionDiagram newCube(BDD bdd, boolean[] setVariables) {
   return new BinaryDecisionDiagram(bdd, bdd.cube(setVariables));
 }
예제 #11
0
 public static BinaryDecisionDiagram nothing(BDD bdd) {
   return new BinaryDecisionDiagram(bdd, bdd.getZero());
 }
예제 #12
0
 public static BinaryDecisionDiagram anything(BDD bdd) {
   return new BinaryDecisionDiagram(bdd, bdd.getOne());
 }
예제 #13
0
 public static BinaryDecisionDiagram newVariable(BDD bdd) {
   return new BinaryDecisionDiagram(bdd, bdd.createVar());
 }
예제 #14
0
 private BinaryDecisionDiagram(BDD bdd, int id) {
   this.bdd = bdd;
   this.id = bdd.ref(id);
 }
예제 #15
0
 public BinaryDecisionDiagram copy() {
   return new BinaryDecisionDiagram(bdd, bdd.ref(id));
 }
예제 #16
0
 public BinaryDecisionDiagram existsTo(BinaryDecisionDiagram binaryDecisionDiagram) {
   int oldId = id;
   this.id = bdd.exists(id, binaryDecisionDiagram.id);
   discard(oldId);
   return this;
 }