Package com.github.javabdd
Class BDD.BDDIterator
- java.lang.Object
-
- com.github.javabdd.BDD.BDDIterator
-
-
Constructor Summary
Constructors Constructor Description BDDIterator(BDD bdd, BDDVarSet var)Construct a new BDDIterator on the given BDD.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfastForward(int var)Fast-forward the iteration such that the given variable number is true.voidfastForward(int[] vars)Fast-forward the iteration such that the given set of variables are true.protected voidgotoNext()protected booleangotoNextA()booleanhasNext()booleanisDontCare(int var)Returns true if the given BDD variable number is a dont-care.booleanisDontCare(BDDDomain d)Returns true if the BDD variables in the given BDD domain are all dont-care's.BDDnext()BDDnextBDD()Return the next BDD in the iteration.boolean[]nextSat()Return the next single satisfying assignment in the iteration.BigInteger[]nextTuple()Return the next tuple of domain values in the iteration.BigInteger[]nextTuple2()An alternate implementation of nextTuple().BigIntegernextValue(BDDDomain dom)voidremove()voidskipDontCare(BDDDomain d)Assumingdis a dont-care, skip to the end of the iteration ford.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
gotoNext
protected void gotoNext()
-
gotoNextA
protected boolean gotoNextA()
-
nextValue
public BigInteger nextValue(BDDDomain dom)
-
nextTuple
public BigInteger[] nextTuple()
Return the next tuple of domain values in the iteration.- Returns:
- the next tuple of domain values in the iteration.
-
nextTuple2
public BigInteger[] nextTuple2()
An alternate implementation of nextTuple(). This may be slightly faster than the default if there are many domains.- Returns:
- the next tuple of domain values in the iteration.
-
nextSat
public boolean[] nextSat()
Return the next single satisfying assignment in the iteration.- Returns:
- the next single satisfying assignment in the iteration.
-
nextBDD
public BDD nextBDD()
Return the next BDD in the iteration.- Returns:
- the next BDD in the iteration
-
isDontCare
public boolean isDontCare(int var)
Returns true if the given BDD variable number is a dont-care.varmust be a variable in the iteration set.- Parameters:
var- variable number to check- Returns:
- if the given variable is a dont-care
-
isDontCare
public boolean isDontCare(BDDDomain d)
Returns true if the BDD variables in the given BDD domain are all dont-care's.- Parameters:
d- domain to check- Returns:
- if the variables are all dont-cares
- Throws:
BDDException- if d is not in the iteration set
-
fastForward
public void fastForward(int var)
Fast-forward the iteration such that the given variable number is true.- Parameters:
var- number of variable
-
fastForward
public void fastForward(int[] vars)
Fast-forward the iteration such that the given set of variables are true.- Parameters:
vars- set of variable indices
-
skipDontCare
public void skipDontCare(BDDDomain d)
Assumingdis a dont-care, skip to the end of the iteration ford.- Parameters:
d- BDD domain to fast-forward past
-
-