java.lang.Object
org.maxicp.state.datastructures.StateSparseBitSet
Class to represent a bit-set that can be saved and restored through
the
StateManager.saveState() / StateManager.restoreState()-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassTemporary bitset used to hold temporary value.classBitset of the same capacity as the outerStateSparseBitSet. -
Constructor Summary
ConstructorsConstructorDescriptionStateSparseBitSet(StateManager sm, int n) Creates a StateSparseSet with n bits, initially all set (value 1 for all) -
Method Summary
-
Constructor Details
-
StateSparseBitSet
Creates a StateSparseSet with n bits, initially all set (value 1 for all)- Parameters:
sm- the state managern- the number of bits
-
-
Method Details
-
isEmpty
public boolean isEmpty()Test is the reversibleSparseBitSet is empty- Returns:
- true is empty, false otherwise
-
remove
Remove the content of the BitSet from this sparseBitSet- Parameters:
bs- the BitSet to remove
-
intersect
Intersect this sparseBitSet with bs- Parameters:
bs- the BitSet to intersect with
-
hasEmptyIntersection
Test the emptiness of the intersection with a given BitSet- Parameters:
bs- the BitSet to test the intersection with- Returns:
- true if empty, false otherwise
-
countIntersection
-
toString
-