PrimitiveArray-0.10.1.0: Efficient multidimensional arrays
Safe HaskellNone
LanguageHaskell2010

Data.PrimitiveArray.Index.BitSet0

Description

The most basic bitset structure. Alone, not particularly useful, because two sets {u,v},{v',w} have no way of annotating the connection between the sets. Together with boundaries this yields sets for useful DP algorithms.

Synopsis

Documentation

newtype BitSet t Source #

Newtype for a bitset.

Int integrates better with the rest of the framework. But we should consider moving to Word-based indexing, if possible.

Constructors

BitSet 

Fields

Instances

Instances details
Vector Vector (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

MVector MVector (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Eq (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

(==) :: BitSet t -> BitSet t -> Bool #

(/=) :: BitSet t -> BitSet t -> Bool #

Num (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

(+) :: BitSet t -> BitSet t -> BitSet t #

(-) :: BitSet t -> BitSet t -> BitSet t #

(*) :: BitSet t -> BitSet t -> BitSet t #

negate :: BitSet t -> BitSet t #

abs :: BitSet t -> BitSet t #

signum :: BitSet t -> BitSet t #

fromInteger :: Integer -> BitSet t #

Ord (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

compare :: BitSet t -> BitSet t -> Ordering #

(<) :: BitSet t -> BitSet t -> Bool #

(<=) :: BitSet t -> BitSet t -> Bool #

(>) :: BitSet t -> BitSet t -> Bool #

(>=) :: BitSet t -> BitSet t -> Bool #

max :: BitSet t -> BitSet t -> BitSet t #

min :: BitSet t -> BitSet t -> BitSet t #

Show (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

showsPrec :: Int -> BitSet t -> ShowS #

show :: BitSet t -> String #

showList :: [BitSet t] -> ShowS #

Generic (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Associated Types

type Rep (BitSet t) :: Type -> Type #

Methods

from :: BitSet t -> Rep (BitSet t) x #

to :: Rep (BitSet t) x -> BitSet t #

Arbitrary (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

arbitrary :: Gen (BitSet t) #

shrink :: BitSet t -> [BitSet t] #

NFData (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

rnf :: BitSet t -> () #

Hashable (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

hashWithSalt :: Int -> BitSet t -> Int #

hash :: BitSet t -> Int #

ToJSON (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

ToJSONKey (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

FromJSON (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

FromJSONKey (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Bits (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

(.&.) :: BitSet t -> BitSet t -> BitSet t #

(.|.) :: BitSet t -> BitSet t -> BitSet t #

xor :: BitSet t -> BitSet t -> BitSet t #

complement :: BitSet t -> BitSet t #

shift :: BitSet t -> Int -> BitSet t #

rotate :: BitSet t -> Int -> BitSet t #

zeroBits :: BitSet t #

bit :: Int -> BitSet t #

setBit :: BitSet t -> Int -> BitSet t #

clearBit :: BitSet t -> Int -> BitSet t #

complementBit :: BitSet t -> Int -> BitSet t #

testBit :: BitSet t -> Int -> Bool #

bitSizeMaybe :: BitSet t -> Maybe Int #

bitSize :: BitSet t -> Int #

isSigned :: BitSet t -> Bool #

shiftL :: BitSet t -> Int -> BitSet t #

unsafeShiftL :: BitSet t -> Int -> BitSet t #

shiftR :: BitSet t -> Int -> BitSet t #

unsafeShiftR :: BitSet t -> Int -> BitSet t #

rotateL :: BitSet t -> Int -> BitSet t #

rotateR :: BitSet t -> Int -> BitSet t #

popCount :: BitSet t -> Int #

FiniteBits (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Binary (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

put :: BitSet t -> Put #

get :: Get (BitSet t) #

putList :: [BitSet t] -> Put #

Ranked (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

lsb :: BitSet t -> Int #

rank :: BitSet t -> Int #

nlz :: BitSet t -> Int #

Serialize (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

put :: Putter (BitSet t) #

get :: Get (BitSet t) #

Unbox (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

IndexStream z => IndexStream (z :. BitSet C) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

streamUp :: forall (m :: Type -> Type). Monad m => LimitType (z :. BitSet C) -> LimitType (z :. BitSet C) -> Stream m (z :. BitSet C) Source #

streamDown :: forall (m :: Type -> Type). Monad m => LimitType (z :. BitSet C) -> LimitType (z :. BitSet C) -> Stream m (z :. BitSet C) Source #

IndexStream z => IndexStream (z :. BitSet O) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

streamUp :: forall (m :: Type -> Type). Monad m => LimitType (z :. BitSet O) -> LimitType (z :. BitSet O) -> Stream m (z :. BitSet O) Source #

streamDown :: forall (m :: Type -> Type). Monad m => LimitType (z :. BitSet O) -> LimitType (z :. BitSet O) -> Stream m (z :. BitSet O) Source #

IndexStream z => IndexStream (z :. BitSet I) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

streamUp :: forall (m :: Type -> Type). Monad m => LimitType (z :. BitSet I) -> LimitType (z :. BitSet I) -> Stream m (z :. BitSet I) Source #

streamDown :: forall (m :: Type -> Type). Monad m => LimitType (z :. BitSet I) -> LimitType (z :. BitSet I) -> Stream m (z :. BitSet I) Source #

IndexStream (Z :. BitSet t) => IndexStream (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

streamUp :: forall (m :: Type -> Type). Monad m => LimitType (BitSet t) -> LimitType (BitSet t) -> Stream m (BitSet t) Source #

streamDown :: forall (m :: Type -> Type). Monad m => LimitType (BitSet t) -> LimitType (BitSet t) -> Stream m (BitSet t) Source #

Index (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Associated Types

data LimitType (BitSet t) Source #

SetPredSucc (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

Methods

setSucc :: Int -> Int -> BitSet t -> Maybe (BitSet t) Source #

setPred :: Int -> Int -> BitSet t -> Maybe (BitSet t) Source #

newtype MVector s (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

newtype MVector s (BitSet t) = MV_BitSet (MVector s Int)
type Rep (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

type Rep (BitSet t) = D1 ('MetaData "BitSet" "Data.PrimitiveArray.Index.BitSet0" "PrimitiveArray-0.10.1.0-8LhqXNFuZNc70s43xh6tNJ" 'True) (C1 ('MetaCons "BitSet" 'PrefixI 'True) (S1 ('MetaSel ('Just "_bitSet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))
newtype Vector (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

newtype Vector (BitSet t) = V_BitSet (Vector Int)
newtype LimitType (BitSet t) Source # 
Instance details

Defined in Data.PrimitiveArray.Index.BitSet0

bitSet :: forall k (t :: k) k (t :: k). Iso (BitSet (t :: k)) (BitSet (t :: k)) Int Int Source #

streamUpMk :: Monad m => Int -> Int -> t -> m (t, Maybe (BitSet ioc)) Source #

streamUpStep :: Monad m => Int -> Int -> (t, Maybe (BitSet ioc)) -> m (Step (t, Maybe (BitSet ioc)) (t :. BitSet ioc)) Source #

streamDownMk :: Monad m => Int -> Int -> t -> m (t, Maybe (BitSet ioc)) Source #

streamDownStep :: Monad m => Int -> Int -> (t, Maybe (BitSet ioc)) -> m (Step (t, Maybe (BitSet ioc)) (t :. BitSet ioc)) Source #