Package com.github.javabdd
Class BDDVarSet
java.lang.Object
com.github.javabdd.BDDVarSet
- Direct Known Subclasses:
BDDFactoryIntImpl.IntBDDVarSet,BDDVarSet.DefaultImpl
Some BDD methods, namely
exist(), forall(), unique(), relprod(), applyAll(),
applyEx(), applyUni(), and satCount() take a BDDVarSet argument.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDefault implementation of BDDVarSet based on BDDs. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanabstract booleanequalsBDDVarSet(BDDVarSet that) Returns true if the sets are equal.abstract voidfree()Scans this BDD and copies the stored variables into an array of BDDDomains.abstract BDDFactoryReturns the factory that created this BDDVarSet.abstract inthashCode()abstract BDDVarSetid()abstract BDDVarSetReturns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet.abstract BDDVarSetModifies this BDDVarSet to include all of the vars in the given set.abstract booleanisEmpty()abstract intsize()abstract int[]toArray()abstract BDDtoBDD()abstract int[]toString()abstract BDDVarSetunion(int var) Returns a new BDDVarSet that is the union of the current BDDVarSet and the given variable.abstract BDDVarSetReturns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet.abstract BDDVarSetunionWith(int var) Modifies this BDDVarSet to include the given variable.abstract BDDVarSetModifies this BDDVarSet to include all of the vars in the given set.
-
Constructor Details
-
BDDVarSet
public BDDVarSet()
-
-
Method Details
-
getFactory
Returns the factory that created this BDDVarSet.- Returns:
- factory that created this BDDVarSet
-
toBDD
-
id
-
free
public abstract void free() -
size
public abstract int size() -
isEmpty
public abstract boolean isEmpty() -
toArray
public abstract int[] toArray() -
toLevelArray
public abstract int[] toLevelArray() -
toString
-
getDomains
Scans this BDD and copies the stored variables into an array of BDDDomains. The domains returned are guaranteed to be in ascending order.Compare to fdd_scanset.
- Returns:
- int[]
-
union
Returns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet. This constructs a new set; neither the current nor the given BDDVarSet is modified.- Parameters:
b- BDDVarSet to union with- Returns:
- a new BDDVarSet that is the union of the two sets
-
union
Returns a new BDDVarSet that is the union of the current BDDVarSet and the given variable. This constructs a new set; the current BDDVarSet is not modified.- Parameters:
var- variable to add to set- Returns:
- a new BDDVarSet that includes the given variable
-
unionWith
Modifies this BDDVarSet to include all of the vars in the given set. This modifies the current set in place and consumes the given set.- Parameters:
b- BDDVarSet to union in- Returns:
- this
-
unionWith
Modifies this BDDVarSet to include the given variable. This modifies the current set in place.- Parameters:
var- variable to add to set- Returns:
- this
-
intersect
Returns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet. This constructs a new set; neither the current nor the given BDDVarSet is modified.- Parameters:
b- BDDVarSet to union with- Returns:
- a new BDDVarSet that is the union of the two sets
-
intersectWith
Modifies this BDDVarSet to include all of the vars in the given set. This modifies the current set in place and consumes the given set.- Parameters:
b- BDDVarSet to union in- Returns:
- this
-
hashCode
public abstract int hashCode() -
equalsBDDVarSet
Returns true if the sets are equal.- Parameters:
that- other set- Returns:
- true if the sets are equal
-
equals
-