discrete-space-map-0.0.5: A discrete space map.

Safe HaskellSafe
LanguageHaskell98

Data.DiscreteSpaceMap.Internal

Synopsis

Documentation

class Eq p => Pos p where Source #

To be a key in the map, a position needs to be convertible to and from a stream of bits.

Minimal complete definition

uncons, cons, zero

Methods

uncons :: p -> (p, Bool) Source #

cons :: (p, Bool) -> p Source #

cons . uncons == id 

zero :: p Source #

uncons zero == (zero, False)

Instances

Pos Integer Source #

1D discrete space

Pos [Bool] Source #

[Bool] is the free instance of Pos.

Methods

uncons :: [Bool] -> ([Bool], Bool) Source #

cons :: ([Bool], Bool) -> [Bool] Source #

zero :: [Bool] Source #

Pos p => Pos (p, p) Source #

2D discrete space

Methods

uncons :: (p, p) -> ((p, p), Bool) Source #

cons :: ((p, p), Bool) -> (p, p) Source #

zero :: (p, p) Source #

Pos p => Pos (p, p, p) Source #

3D discrete space

Methods

uncons :: (p, p, p) -> ((p, p, p), Bool) Source #

cons :: ((p, p, p), Bool) -> (p, p, p) Source #

zero :: (p, p, p) Source #

data MapD a Source #

Constructors

MapD a (MapD (a, a)) 

Instances

Functor MapD Source # 

Methods

fmap :: (a -> b) -> MapD a -> MapD b #

(<$) :: a -> MapD b -> MapD a #

Foldable MapD Source # 

Methods

fold :: Monoid m => MapD m -> m #

foldMap :: Monoid m => (a -> m) -> MapD a -> m #

foldr :: (a -> b -> b) -> b -> MapD a -> b #

foldr' :: (a -> b -> b) -> b -> MapD a -> b #

foldl :: (b -> a -> b) -> b -> MapD a -> b #

foldl' :: (b -> a -> b) -> b -> MapD a -> b #

foldr1 :: (a -> a -> a) -> MapD a -> a #

foldl1 :: (a -> a -> a) -> MapD a -> a #

toList :: MapD a -> [a] #

null :: MapD a -> Bool #

length :: MapD a -> Int #

elem :: Eq a => a -> MapD a -> Bool #

maximum :: Ord a => MapD a -> a #

minimum :: Ord a => MapD a -> a #

sum :: Num a => MapD a -> a #

product :: Num a => MapD a -> a #

Traversable MapD Source # 

Methods

traverse :: Applicative f => (a -> f b) -> MapD a -> f (MapD b) #

sequenceA :: Applicative f => MapD (f a) -> f (MapD a) #

mapM :: Monad m => (a -> m b) -> MapD a -> m (MapD b) #

sequence :: Monad m => MapD (m a) -> m (MapD a) #

Traversable1 MapD Source # 

Methods

traverse1 :: Apply f => (a -> f b) -> MapD a -> f (MapD b) #

sequence1 :: Apply f => MapD (f b) -> f (MapD b) #

Foldable1 MapD Source # 

Methods

fold1 :: Semigroup m => MapD m -> m #

foldMap1 :: Semigroup m => (a -> m) -> MapD a -> m #

Show a => Show (MapD a) Source # 

Methods

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

show :: MapD a -> String #

showList :: [MapD a] -> ShowS #

gotoD :: Pos p => p -> p -> (a, MapD a) -> (a, MapD a) Source #

tabulateD :: Pos p => (p -> a) -> MapD a Source #

cotraverseD :: Functor f => (f a -> b) -> f (MapD a) -> MapD b Source #

zipWithKeyD :: Pos p => (p -> a -> b -> c) -> p -> MapD a -> MapD b -> MapD c Source #

traverseWithKey1D :: (Pos p, Apply f) => (p -> a -> f b) -> p -> MapD a -> f (MapD b) Source #