|
Data.Ring.Semi.BitSet | Portability | portable (instances use MPTCs) | Stability | experimental | Maintainer | ekmett@gmail.com |
|
|
|
|
|
Description |
Replacement for Data.BitSet extended to handle enumerations where fromEnum
can return negative values, support efficient intersection and union
and allow complementing of the set with respect to the bounds of the
enumeration
|
|
Synopsis |
|
|
|
Documentation |
|
module Data.Monoid.Reducer |
|
module Data.Ring.Semi |
|
BitSet
|
|
|
Instances | Typeable1 BitSet | Enum a => Reducer a (BitSet a) | Enum a => Module Natural (BitSet a) | Enum a => RightModule Natural (BitSet a) | Enum a => LeftModule Natural (BitSet a) | (Bounded a, Enum a) => Algebra Natural (BitSet a) | (Enum a, Bounded a) => Bounded (BitSet a) | (Enum a, Bounded a) => Enum (BitSet a) | Eq (BitSet a) | Typeable a => Data (BitSet a) | (Enum a, Read a) => Read (BitSet a) | (Enum a, Show a) => Show (BitSet a) | Enum a => Monoid (BitSet a) | Enum a => Generator (BitSet a) | (Bounded a, Enum a) => Multiplicative (BitSet a) | (Bounded a, Enum a) => RightSemiNearRing (BitSet a) | (Bounded a, Enum a) => LeftSemiNearRing (BitSet a) | (Bounded a, Enum a) => SemiRing (BitSet a) | (Bounded a, Enum a) => Module (BitSet a) (BitSet a) | (Bounded a, Enum a) => RightModule (BitSet a) (BitSet a) | (Bounded a, Enum a) => LeftModule (BitSet a) (BitSet a) |
|
|
|
Manipulation
|
|
|
O(1) The empty set. Permits O(1) null and size.
|
|
|
O(1) Construct a BitSet with a single element. Permits O(1) null and size
|
|
|
O(d) A BitSet containing every member of the enumeration of a.
|
|
|
O(d). May force size to take O(d) if ranges overlap, preserves order of null
|
|
|
O(d). May force size and null both to take O(d).
|
|
|
O(d) Complements a BitSet with respect to the bounds of a. Preserves order of null and size
|
|
|
O(d) Insert a single element of type a into the BitSet. Preserves order of null and size
|
|
|
O(d) Delete a single item from the BitSet. Preserves order of null and size
|
|
|
O(d). Preserves order of null. May force O(d) size.
|
|
|
O(d * n) Make a BitSet from a list of items.
|
|
|
O(d * n) Make a BitSet from a distinct ascending list of items
|
|
Acessors
|
|
|
O(1) Test for membership in a BitSet
|
|
|
O(1|d) Is the BitSet empty? May be faster than checking if size == 0 after union.
Operations that require a recount are noted.
|
|
|
O(1|d) The number of elements in the bit set.
|
|
|
O(1) check to see if we are represented as a complemented BitSet.
|
|
|
O(d) convert to an Integer representation. Discards negative elements
|
|
Produced by Haddock version 2.4.2 |