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

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

Methods

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

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

cons . uncons == id

zero :: p Source #

uncons zero == (zero, False)

Instances

 Source # 1D discrete space Methodsuncons :: Integer -> (Integer, Bool) Source #cons :: (Integer, Bool) -> Integer Source # Pos [Bool] Source # [Bool] is the free instance of Pos. Methodsuncons :: [Bool] -> ([Bool], Bool) Source #cons :: ([Bool], Bool) -> [Bool] Source #zero :: [Bool] Source # Pos p => Pos (p, p) Source # 2D discrete space Methodsuncons :: (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 Methodsuncons :: (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

 Source # Methodsfmap :: (a -> b) -> MapD a -> MapD b #(<\$) :: a -> MapD b -> MapD a # Source # Methodsfold :: 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 # Source # Methodstraverse :: 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) # Source # Methodstraverse1 :: Apply f => (a -> f b) -> MapD a -> f (MapD b) #sequence1 :: Apply f => MapD (f b) -> f (MapD b) # Source # Methodsfold1 :: Semigroup m => MapD m -> m #foldMap1 :: Semigroup m => (a -> m) -> MapD a -> m # Show a => Show (MapD a) Source # MethodsshowsPrec :: 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 #