libcspm-1.0.0: A library providing a parser, type checker and evaluator for CSPM.

Safe HaskellNone




Bit sets represent sets of integers by setting bit i to 1 iff i is in the set. This means they can effeciently support many operations, like union (bitwise or), intersection (bitwise and) etc. However, they obviously can only represent sets of relatively small integers, as they require O(max(S)) bits.


Mutable Bit Sets

type Set s = STUArray s Int BucketSource


newSized :: Int -> ST s (Set s)Source

Standard Operations

member :: Set s -> Int -> ST s BoolSource

insert :: Set s -> Int -> ST s ()Source

remove :: Set s -> Int -> ST s ()Source