net.sf.javabdd
Class BDD.AllSatIterator
java.lang.Object
net.sf.javabdd.BDD.AllSatIterator
- All Implemented Interfaces:
- Iterator
- Enclosing class:
- BDD
public static class BDD.AllSatIterator
- extends Object
- implements Iterator
Iterator that returns all satisfying assignments as byte arrays.
In the byte arrays, -1 means dont-care, 0 means 0, and 1 means 1.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
f
protected final BDDFactory f
loStack
protected LinkedList loStack
hiStack
protected LinkedList hiStack
allsatProfile
protected byte[] allsatProfile
useLevel
protected final boolean useLevel
BDD.AllSatIterator
protected BDD.AllSatIterator(BDDFactory factory,
boolean level)
BDD.AllSatIterator
public BDD.AllSatIterator(BDD r)
- 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
BDD.AllSatIterator
public BDD.AllSatIterator(BDD r,
boolean lev)
- 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
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
nextSat
public byte[] nextSat()
- Return the next satisfying var setting.
- Returns:
- byte[]
next
public Object next()
- Specified by:
next
in interface Iterator
remove
public void remove()
- Specified by:
remove
in interface Iterator
Copyright © 2003-2007 John Whaley. All Rights Reserved.