containers-accelerate-0.1.0.0: Hashing-based container types

Copyright[2020] Trevor L. McDonell
LicenseBSD3
MaintainerTrevor L. McDonell <trevor.mcdonell@gmail.com>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Data.Array.Accelerate.Data.HashSet

Contents

Description

 
Synopsis

Documentation

data HashSet a Source #

A set of values. A set can not contain duplicate values

Instances
(Elt a, Show a) => Show (HashSet a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.HashSet

Methods

showsPrec :: Int -> HashSet a -> ShowS #

show :: HashSet a -> String #

showList :: [HashSet a] -> ShowS #

Generic (HashSet a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.HashSet

Associated Types

type Rep (HashSet a) :: Type -> Type #

Methods

from :: HashSet a -> Rep (HashSet a) x #

to :: Rep (HashSet a) x -> HashSet a #

Elt a => Arrays (HashSet a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.HashSet

Associated Types

type ArraysR (HashSet a) :: Type

Methods

arraysR :: ArraysR (ArraysR (HashSet a))

toArr :: ArraysR (HashSet a) -> HashSet a

fromArr :: HashSet a -> ArraysR (HashSet a)

type Rep (HashSet a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.HashSet

type Rep (HashSet a) = D1 (MetaData "HashSet" "Data.Array.Accelerate.Data.HashSet" "containers-accelerate-0.1.0.0-HRkGy506EArB8TUryGDXpu" False) (C1 (MetaCons "HashSet" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HashMap a ()))))
type ArraysR (HashSet a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.HashSet

type ArraysR (HashSet a) = GArraysR () (Rep (HashSet a))

class Elt a => Hashable a #

The class of types that can be converted to a hash value.

Minimal complete definition

hashWithSalt

Instances
Hashable Bool 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp Bool -> Exp Int #

hash :: Exp Bool -> Exp Int #

Hashable Char 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp Char -> Exp Int #

hash :: Exp Char -> Exp Int #

Hashable Double 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Hashable Float 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Hashable Int 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp Int -> Exp Int #

hash :: Exp Int -> Exp Int #

Hashable Int8 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp Int8 -> Exp Int #

hash :: Exp Int8 -> Exp Int #

Hashable Int16 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Hashable Int32 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Hashable Int64 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Hashable Word 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp Word -> Exp Int #

hash :: Exp Word -> Exp Int #

Hashable Word8 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Hashable Word16 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Hashable Word32 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Hashable Word64 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Hashable () 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp () -> Exp Int #

hash :: Exp () -> Exp Int #

Hashable Half 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp Half -> Exp Int #

hash :: Exp Half -> Exp Int #

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (Maybe a) -> Exp Int #

hash :: Exp (Maybe a) -> Exp Int #

Hashable a => Hashable (Ratio a) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (Ratio a) -> Exp Int #

hash :: Exp (Ratio a) -> Exp Int #

Hashable a => Hashable (Product a) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (Product a) -> Exp Int #

hash :: Exp (Product a) -> Exp Int #

Hashable a => Hashable (Sum a) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (Sum a) -> Exp Int #

hash :: Exp (Sum a) -> Exp Int #

Hashable a => Hashable (Max a) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (Max a) -> Exp Int #

hash :: Exp (Max a) -> Exp Int #

Hashable a => Hashable (Min a) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (Min a) -> Exp Int #

hash :: Exp (Min a) -> Exp Int #

Hashable a => Hashable (Complex a) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (Complex a) -> Exp Int #

hash :: Exp (Complex a) -> Exp Int #

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (Either a b) -> Exp Int #

hash :: Exp (Either a b) -> Exp Int #

(Hashable x0, Hashable x1) => Hashable (x0, x1) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1) -> Exp Int #

hash :: Exp (x0, x1) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2) => Hashable (x0, x1, x2) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2) -> Exp Int #

hash :: Exp (x0, x1, x2) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3) => Hashable (x0, x1, x2, x3) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3) -> Exp Int #

hash :: Exp (x0, x1, x2, x3) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4) => Hashable (x0, x1, x2, x3, x4) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5) => Hashable (x0, x1, x2, x3, x4, x5) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6) => Hashable (x0, x1, x2, x3, x4, x5, x6) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6, Hashable x7) => Hashable (x0, x1, x2, x3, x4, x5, x6, x7) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6, x7) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6, x7) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6, Hashable x7, Hashable x8) => Hashable (x0, x1, x2, x3, x4, x5, x6, x7, x8) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6, Hashable x7, Hashable x8, Hashable x9) => Hashable (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6, Hashable x7, Hashable x8, Hashable x9, Hashable x10) => Hashable (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6, Hashable x7, Hashable x8, Hashable x9, Hashable x10, Hashable x11) => Hashable (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6, Hashable x7, Hashable x8, Hashable x9, Hashable x10, Hashable x11, Hashable x12) => Hashable (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6, Hashable x7, Hashable x8, Hashable x9, Hashable x10, Hashable x11, Hashable x12, Hashable x13) => Hashable (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6, Hashable x7, Hashable x8, Hashable x9, Hashable x10, Hashable x11, Hashable x12, Hashable x13, Hashable x14) => Hashable (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) -> Exp Int #

(Hashable x0, Hashable x1, Hashable x2, Hashable x3, Hashable x4, Hashable x5, Hashable x6, Hashable x7, Hashable x8, Hashable x9, Hashable x10, Hashable x11, Hashable x12, Hashable x13, Hashable x14, Hashable x15) => Hashable (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) 
Instance details

Defined in Data.Array.Accelerate.Data.Hashable

Methods

hashWithSalt :: Exp Int -> Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) -> Exp Int #

hash :: Exp (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) -> Exp Int #

Construction

fromVector :: Hashable a => Acc (Vector a) -> Acc (HashSet a) Source #

O(n log n) Construct the set from the specified values

Basic interface

size :: Elt a => Acc (HashSet a) -> Exp Int Source #

O(1) Return the number of key-value mappings

member :: (Eq a, Hashable a) => Exp a -> Acc (HashSet a) -> Exp Bool Source #

O(k) Return True if the specified value is present in the set, False otherwise

insert :: (Eq a, Hashable a) => Acc (Vector a) -> Acc (HashSet a) -> Acc (HashSet a) Source #

Add the specified value to this set

delete :: (Eq a, Hashable a) => Acc (Vector a) -> Acc (HashSet a) -> Acc (HashSet a) Source #

Remove the specified value from the set if present

Conversions

elems :: Elt a => Acc (HashSet a) -> Acc (Vector a) Source #

O(1) Return the sets elements

toMap :: Elt a => Acc (HashSet a) -> Acc (HashMap a ()) Source #

O(1) Convert to the equivalent HashMap

fromMap :: Elt a => Acc (HashMap a ()) -> Acc (HashSet a) Source #

O(1) Convert from the equivalent HashMap