Package com.github.javabdd
Class BDDVarSet.DefaultImpl
java.lang.Object
com.github.javabdd.BDDVarSet
com.github.javabdd.BDDVarSet.DefaultImpl
- Enclosing class:
- BDDVarSet
Default implementation of BDDVarSet based on BDDs.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.javabdd.BDDVarSet
BDDVarSet.DefaultImpl -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the sets are equal.booleanvoidfree()Returns the factory that created this BDDVarSet.inthashCode()id()Returns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet.Modifies this BDDVarSet to include all of the vars in the given set.booleanisEmpty()intsize()int[]toArray()toBDD()int[]union(int var) Returns a new BDDVarSet that is the union of the current BDDVarSet and the given variable.Returns a new BDDVarSet that is the union of the current BDDVarSet and the given BDDVarSet.unionWith(int var) Modifies this BDDVarSet to include the given variable.Modifies this BDDVarSet to include all of the vars in the given set.Methods inherited from class com.github.javabdd.BDDVarSet
equals, getDomains, toString
-
Field Details
-
b
BDD representation of the set of variables. Treated like a linked list of variables.
-
-
Constructor Details
-
DefaultImpl
Construct a BDDVarSet backed by the given BDD. Ownership of the given BDD is transferred to this BDDVarSet, so you should not touch it after construction!- Parameters:
b- BDD to use in constructing BDDVarSet
-
-
Method Details
-
free
public void free() -
getFactory
Description copied from class:BDDVarSetReturns the factory that created this BDDVarSet.- Specified by:
getFactoryin classBDDVarSet- Returns:
- factory that created this BDDVarSet
-
id
-
intersect
Description copied from class:BDDVarSetReturns 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. -
intersectWith
Description copied from class:BDDVarSetModifies this BDDVarSet to include all of the vars in the given set. This modifies the current set in place and consumes the given set.- Specified by:
intersectWithin classBDDVarSet- Parameters:
s- BDDVarSet to union in- Returns:
- this
-
isEmpty
public boolean isEmpty() -
size
public int size() -
toArray
public int[] toArray() -
toBDD
-
toLevelArray
public int[] toLevelArray()- Specified by:
toLevelArrayin classBDDVarSet
-
union
Description copied from class:BDDVarSetReturns 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. -
union
Description copied from class:BDDVarSetReturns 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. -
unionWith
Description copied from class:BDDVarSetModifies this BDDVarSet to include all of the vars in the given set. This modifies the current set in place and consumes the given set. -
unionWith
Description copied from class:BDDVarSetModifies this BDDVarSet to include the given variable. This modifies the current set in place. -
hashCode
public int hashCode() -
equalsBDDVarSet
Description copied from class:BDDVarSetReturns true if the sets are equal.- Specified by:
equalsBDDVarSetin classBDDVarSet- Parameters:
s- other set- Returns:
- true if the sets are equal
-
equalsDefaultImpl
-