Package com.github.javabdd
Class BDD.AllSatIterator
java.lang.Object
com.github.javabdd.BDD.AllSatIterator
- All Implemented Interfaces:
Iterator<byte[]>
- Enclosing class:
- BDD
Iterator that returns all satisfying assignments as byte arrays. In the byte arrays, -1 means dont-care, 0 means
0, and 1 means 1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected final BDDFactoryprotected LinkedList<BDD>protected LinkedList<BDD>protected final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs a satisfying-assignment iterator on the given BDD.protectedAllSatIterator(BDDFactory factory, boolean level) AllSatIterator(BDD r, boolean lev) Constructs a satisfying-assignment iterator on the given BDD. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
f
-
loStack
-
hiStack
-
allsatProfile
protected byte[] allsatProfile -
useLevel
protected final boolean useLevel
-
-
Constructor Details
-
AllSatIterator
-
AllSatIterator
Constructs a satisfying-assignment iterator on the given BDD. next() returns a byte array indexed by BDD variable number.- Parameters:
r- BDD to iterate over
-
AllSatIterator
Constructs a satisfying-assignment iterator on the given BDD. If lev is true, next() will returns a byte array indexed by level. If lev is false, the byte array will be indexed by BDD variable number.- Parameters:
r- BDD to iterate overlev- whether to index byte array by level instead of var
-
-
Method Details
-
hasNext
public boolean hasNext() -
nextSat
public byte[] nextSat()Return the next satisfying var setting.- Returns:
- byte[]
-
next
public byte[] next() -
remove
public void remove()
-