quickset-0.1.0: Very fast and memory-compact query-only set and map structures

MaintainerErtugrul Soeylemez <es@ertes.de>
Safe HaskellNone

Data.QuickSet

Contents

Description

This module implements very fast and compact query-only sets.

Synopsis

QuickSet

data QuickSet a Source

QuickSets are sets that use a compact unboxed vector as the internal representation. As such QuickSets are always strict in the values.

Instances

Typeable1 QuickSet 
(Eq a, Unbox a) => Eq (QuickSet a) 
(Typeable (QuickSet a), Data a, Unbox a) => Data (QuickSet a) 
(Eq (QuickSet a), Ord a, Unbox a) => Ord (QuickSet a) 
(Ord a, Read a, Unbox a) => Read (QuickSet a) 
(Show a, Unbox a) => Show (QuickSet a) 

Construction

fromList :: (Ord a, Unbox a) => [a] -> QuickSet aSource

Convert a list to a QuickSet.

fromListN :: (Ord a, Unbox a) => Int -> [a] -> QuickSet aSource

Convert a prefix of the given length of the given list to a QuickSet.

fromVector :: (Ord a, Unbox a) => Vector a -> QuickSet aSource

Convert an unboxed vector to a QuickSet.

Query

member :: (Ord a, Unbox a) => a -> QuickSet a -> BoolSource

Check whether the given value is in the set.