public BinaryDecisionDiagram relativeProductTo( BinaryDecisionDiagram transitions, BinaryDecisionDiagram existsFromStateAndCharacter) { int oldId = id; this.id = bdd.relProd(id, transitions.id, existsFromStateAndCharacter.id); discard(oldId); return this; }
public BinaryDecisionDiagram replaceTo(Permutation permutation) { int oldId = id; this.id = bdd.replace(id, permutation); discard(oldId); return this; }
private void discard(int id) { bdd.deref(id); }
public int[] oneSatisfyingAssignment(int[] buffer) { return bdd.oneSat(id, buffer); }
public boolean isZero() { return id == bdd.getZero(); }
public BinaryDecisionDiagram and( BinaryDecisionDiagram binaryDecisionDiagram, BinaryDecisionDiagram buffer) { buffer.discard(); buffer.id = bdd.ref(bdd.and(id, binaryDecisionDiagram.id)); return buffer; }
public void printSet() { bdd.printSet(id); }
public BinaryDecisionDiagram orTo(BinaryDecisionDiagram binaryDecisionDiagram) { this.id = bdd.orTo(id, binaryDecisionDiagram.id); return this; }
public BinaryDecisionDiagram not() { return new BinaryDecisionDiagram(bdd, bdd.not(id)); }
public static BinaryDecisionDiagram newCube(BDD bdd, boolean[] setVariables) { return new BinaryDecisionDiagram(bdd, bdd.cube(setVariables)); }
public static BinaryDecisionDiagram nothing(BDD bdd) { return new BinaryDecisionDiagram(bdd, bdd.getZero()); }
public static BinaryDecisionDiagram anything(BDD bdd) { return new BinaryDecisionDiagram(bdd, bdd.getOne()); }
public static BinaryDecisionDiagram newVariable(BDD bdd) { return new BinaryDecisionDiagram(bdd, bdd.createVar()); }
private BinaryDecisionDiagram(BDD bdd, int id) { this.bdd = bdd; this.id = bdd.ref(id); }
public BinaryDecisionDiagram copy() { return new BinaryDecisionDiagram(bdd, bdd.ref(id)); }
public BinaryDecisionDiagram existsTo(BinaryDecisionDiagram binaryDecisionDiagram) { int oldId = id; this.id = bdd.exists(id, binaryDecisionDiagram.id); discard(oldId); return this; }