Safe Haskell | Safe-Inferred |
---|
Var field implementation of sets of (small) natural numbers.
- type VarSet = IntSet
- union :: IntSet -> IntSet -> IntSet
- unions :: [IntSet] -> IntSet
- member :: Int -> IntSet -> Bool
- empty :: IntSet
- delete :: Int -> IntSet -> IntSet
- singleton :: Int -> IntSet
- fromList :: [Int] -> IntSet
- toList :: IntSet -> [Int]
- isSubsetOf :: IntSet -> IntSet -> Bool
- subtract :: Int -> VarSet -> VarSet
Documentation
delete :: Int -> IntSet -> IntSet
O(min(n,W)). Delete a value in the set. Returns the original set when the value was not present.
isSubsetOf :: IntSet -> IntSet -> Bool
O(n+m). Is this a subset?
(s1
tells whether isSubsetOf
s2)s1
is a subset of s2
.