mapalgebra-0.2.1: Efficient, polymorphic Map Algebra.

Copyright(c) Colin Woodbury 2018 - 2020
LicenseBSD3
MaintainerColin Woodbury <colin@fosskers.ca>
Safe HaskellNone
LanguageHaskell2010

Geography.MapAlgebra

Contents

Description

This library is an implementation of Map Algebra as described in the book GIS and Cartographic Modeling (GaCM) by Dana Tomlin. The fundamental primitive is the Raster, a rectangular grid of data that usually describes some area on the earth. A Raster need not contain numerical data, however, and need not just represent satellite imagery. It is essentially a matrix, which of course forms a Functor, and thus is available for all the operations we would expect to run on any Functor. /GIS and Cartographic Modeling/ doesn't lean on this fact, and so describes many seemingly custom operations which to Haskell are just applications of fmap or zipWith with pure functions.

Here are the main classes of operations ascribed to Map Algebra and their corresponding approach in Haskell:

  • Single-Raster Local Operations -> fmap with pure functions
  • Multi-Raster Local Operations -> foldl with zipWith and pure functions
  • Focal Operations -> massiv-based smart Stencil operations
  • Zonal Operations -> Not yet implemented

Whether it is meaningful to perform operations between two given Rasters (i.e. whether the Rasters properly overlap on the earth) is not handled in this library and is left to the application.

The "colour ramp" generation functions (like greenRed) gratefully borrow colour sets from Gretchen N. Peterson's book Cartographer's Toolkit.

A Word on Massiv: Fused, Parallel Arrays

Thanks to the underlying Array library massiv, most operations over and between Rasters are fused, meaning that no extra memory is allocated in between each step of a composite operation.

Take the Enhanced Vegetation Index calculation:

evi :: Raster D p r c Double -> Raster D p r c Double -> Raster D p r c Double -> Raster D p r c Double
evi nir red blue = 2.5 * (numer / denom)
  where numer = nir - red
        denom = nir + (6 * red) - (7.5 * blue) + 1

8 binary operators are used here, but none allocate new memory. It's only when some lazy Raster is made strict that calculations occur and memory is allocated.

Provided your machine has more than 1 CPU, Rasters read by functions like fromRGBA will automatically be in Parallel mode. This means that forcing calculations with strict will cause evaluation to be done with every CPU your machine has. The effect of this is quite potent for Focal Operations, which yield special, cache-friendly windowed (DW) Rasters.

Familiarity with Massiv will help in using this library. A guide can be found here.

Compilation Options for Best Performance

When using this library, always compile your project with -threaded and -with-rtsopts=-N. These will ensure your executables will automatically use all the available CPU cores.

As always, -O2 is your friend. The {-# INLINE ... #-} pragma is also very likely to improve the performance of code that uses functions from this library. Make sure to benchmark proactively.

For particularly mathy operations like fmean, compiling with -fllvm grants about a 2x speedup.

Synopsis

Types

Rasters

newtype Raster u p (r :: Nat) (c :: Nat) a Source #

A rectangular grid of data representing some area on the earth.

  • u: What is the underlying representation of this Raster? (see massiv)
  • p: What Projection is this Raster in?
  • r: How many rows does this Raster have?
  • c: How many columns does this Raster have?
  • a: What data type is held in this Raster?

By having explicit p, r, and c, we make impossible any operation between two Rasters of differing size or projection. Conceptually, we consider Rasters of different size and projection to be entirely different types. Example:

-- | A lazy 256x256 Raster with the value 5 at every index. Uses DataKinds
-- and "type literals" to achieve the same-size guarantee.
myRaster :: Raster D WebMercator 256 256 Int
myRaster = constant D Par 5

>>> length myRaster
65536

Constructors

Raster 

Fields

Instances
Functor (Raster DI p r c) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

fmap :: (a -> b) -> Raster DI p r c a -> Raster DI p r c b #

(<$) :: a -> Raster DI p r c b -> Raster DI p r c a #

Functor (Raster D p r c) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

fmap :: (a -> b) -> Raster D p r c a -> Raster D p r c b #

(<$) :: a -> Raster D p r c b -> Raster D p r c a #

Functor (Raster DW p r c) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

fmap :: (a -> b) -> Raster DW p r c a -> Raster DW p r c b #

(<$) :: a -> Raster DW p r c b -> Raster DW p r c a #

(KnownNat r, KnownNat c) => Applicative (Raster D p r c) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

pure :: a -> Raster D p r c a #

(<*>) :: Raster D p r c (a -> b) -> Raster D p r c a -> Raster D p r c b #

liftA2 :: (a -> b -> c0) -> Raster D p r c a -> Raster D p r c b -> Raster D p r c c0 #

(*>) :: Raster D p r c a -> Raster D p r c b -> Raster D p r c b #

(<*) :: Raster D p r c a -> Raster D p r c b -> Raster D p r c a #

Foldable (Raster D p r c) Source #

length has a specialized \(\mathcal{O}(1)\) implementation.

Instance details

Defined in Geography.MapAlgebra

Methods

fold :: Monoid m => Raster D p r c m -> m #

foldMap :: Monoid m => (a -> m) -> Raster D p r c a -> m #

foldr :: (a -> b -> b) -> b -> Raster D p r c a -> b #

foldr' :: (a -> b -> b) -> b -> Raster D p r c a -> b #

foldl :: (b -> a -> b) -> b -> Raster D p r c a -> b #

foldl' :: (b -> a -> b) -> b -> Raster D p r c a -> b #

foldr1 :: (a -> a -> a) -> Raster D p r c a -> a #

foldl1 :: (a -> a -> a) -> Raster D p r c a -> a #

toList :: Raster D p r c a -> [a] #

null :: Raster D p r c a -> Bool #

length :: Raster D p r c a -> Int #

elem :: Eq a => a -> Raster D p r c a -> Bool #

maximum :: Ord a => Raster D p r c a -> a #

minimum :: Ord a => Raster D p r c a -> a #

sum :: Num a => Raster D p r c a -> a #

product :: Num a => Raster D p r c a -> a #

Eq a => Eq (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster D p r c a -> Raster D p r c a -> Bool #

(/=) :: Raster D p r c a -> Raster D p r c a -> Bool #

Eq a => Eq (Raster B p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster B p r c a -> Raster B p r c a -> Bool #

(/=) :: Raster B p r c a -> Raster B p r c a -> Bool #

(Eq a, NFData a) => Eq (Raster N p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster N p r c a -> Raster N p r c a -> Bool #

(/=) :: Raster N p r c a -> Raster N p r c a -> Bool #

(Eq a, Prim a) => Eq (Raster P p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster P p r c a -> Raster P p r c a -> Bool #

(/=) :: Raster P p r c a -> Raster P p r c a -> Bool #

(Eq a, Storable a) => Eq (Raster S p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster S p r c a -> Raster S p r c a -> Bool #

(/=) :: Raster S p r c a -> Raster S p r c a -> Bool #

(Eq a, Unbox a) => Eq (Raster U p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster U p r c a -> Raster U p r c a -> Bool #

(/=) :: Raster U p r c a -> Raster U p r c a -> Bool #

(Fractional a, KnownNat r, KnownNat c) => Fractional (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(/) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

recip :: Raster D p r c a -> Raster D p r c a #

fromRational :: Rational -> Raster D p r c a #

(Num a, KnownNat r, KnownNat c) => Num (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(+) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

(-) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

(*) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

negate :: Raster D p r c a -> Raster D p r c a #

abs :: Raster D p r c a -> Raster D p r c a #

signum :: Raster D p r c a -> Raster D p r c a #

fromInteger :: Integer -> Raster D p r c a #

(Show a, Load (R u) Ix2 a, Extract u Ix2 a) => Show (Raster u p r c a) Source #

Warning: This will evaluate (at most) the 10x10 top-left corner of your Raster for display. This should only be used for debugging.

Instance details

Defined in Geography.MapAlgebra

Methods

showsPrec :: Int -> Raster u p r c a -> ShowS #

show :: Raster u p r c a -> String #

showList :: [Raster u p r c a] -> ShowS #

Semigroup a => Semigroup (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(<>) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

sconcat :: NonEmpty (Raster D p r c a) -> Raster D p r c a #

stimes :: Integral b => b -> Raster D p r c a -> Raster D p r c a #

(Monoid a, KnownNat r, KnownNat c) => Monoid (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

mempty :: Raster D p r c a #

mappend :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

mconcat :: [Raster D p r c a] -> Raster D p r c a #

lazy :: Source u Ix2 a => Raster u p r c a -> Raster D p r c a Source #

\(\mathcal{O}(1)\). Force a Raster's representation to D, allowing it to undergo various operations. All operations between D Rasters are fused and allocate no extra memory.

strict :: (Load v Ix2 a, Mutable u Ix2 a) => u -> Raster v p r c a -> Raster u p r c a Source #

Evaluate some lazy (D, DW, or DI) Raster to some explicit Manifest type (i.e. to a real memory-backed Array). Will follow the Computation strategy of the underlying massiv Array.

Note: If using the Par computation strategy, make sure you're compiling with -with-rtsopts=-N to automatically use all available CPU cores at runtime. Otherwise your "parallel" operations will only execute on one core.

data RGBARaster p r c a Source #

An RGBA image whose colour bands are distinct.

Constructors

RGBARaster 

Fields

Creation

constant :: (KnownNat r, KnownNat c, Construct u Ix2 a) => u -> Comp -> a -> Raster u p r c a Source #

Create a Raster of any size which has the same value everywhere.

fromFunction :: forall u p r c a. (KnownNat r, KnownNat c, Construct u Ix2 a) => u -> Comp -> (Ix2 -> a) -> Raster u p r c a Source #

\(\mathcal{O}(1)\). Create a Raster from a function of its row and column number respectively.

fromVector :: forall v p r c a. (KnownNat r, KnownNat c, Vector v a, Mutable (ARepr v) Ix2 a, Typeable v) => Comp -> v a -> Either String (Raster (ARepr v) p r c a) Source #

\(\mathcal{O}(1)\). Create a Raster from the values of any Vector type. Will fail if the size of the Vector does not match the declared size of the Raster.

fromRGBA :: forall p r c a. (Elevator a, KnownNat r, KnownNat c) => FilePath -> IO (Either String (RGBARaster p r c a)) Source #

Read any image type into a Raster of distinct colour bands with the cell type you declare. If the source image stores its values as Int but you declare Double, the conversion will happen automatically.

Will fail if the declared size of the Raster does not match the actual size of the input image.

fromGray :: forall p r c a. (Elevator a, KnownNat r, KnownNat c) => FilePath -> IO (Either String (Raster S p r c a)) Source #

Read a grayscale image. If the source file has more than one colour band, they'll be combined automatically.

Colouring

To colour a Raster:

  1. Fully evaluate it with strict S.
  2. Use histogram to analyse the spread of its values. Currently only Word8 is supported.
  3. Use breaks on the Histogram to generate a list of "break points".
  4. Pass the break points to a function like greenRed to generate a "colour ramp" (a Map).
  5. Use this ramp with classify to colour your Raster in \(\mathcal{O}(n\log(n))\). invisible can be used as the default colour for values that fall outside the range of the Map.
colourIt :: Raster D p r c Word8 -> Raster S p r c (Pixel RGBA Word8)
colourIt (strict S -> r) = strict S . classify invisible cm $ lazy r
  where cm = blueGreen . breaks $ histogram r

If you aren't interested in colour but still want to render your Raster, consider grayscale. Coloured Rasters can be unwrapped with _array and then output with functions like writeImage.

grayscale :: Functor (Raster u p r c) => Raster u p r c a -> Raster u p r c (Pixel Y a) Source #

Convert a Raster into grayscale pixels, suitable for easy output with functions like writeImage.

newtype Histogram Source #

A count of Word8 values across some Raster.

Constructors

Histogram 
Instances
Eq Histogram Source # 
Instance details

Defined in Geography.MapAlgebra

Show Histogram Source # 
Instance details

Defined in Geography.MapAlgebra

histogram :: Source u Ix2 Word8 => Raster u p r c Word8 -> Histogram Source #

Given a Raster of byte data, efficiently produce a Histogram that describes value counts across the image. To be passed to breaks.

breaks :: Histogram -> [Word8] Source #

Given a Histogram, produce a list of "colour breaks" as needed by functions like greenRed.

invisible :: Pixel RGBA Word8 Source #

An invisible pixel (alpha channel set to 0).

greenRed :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 32 of Cartographer's Toolkit.

spectrum :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 33 of Cartographer's Toolkit.

blueGreen :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 34 of Cartographer's Toolkit.

purpleYellow :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 35 of Cartographer's Toolkit.

brownBlue :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 36 of Cartographer's Toolkit.

grayBrown :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 37 of Cartographer's Toolkit.

greenPurple :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 38 of Cartographer's Toolkit.

brownYellow :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 39 of Cartographer's Toolkit.

purpleGreen :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 40 of Cartographer's Toolkit.

purpleRed :: Ord k => [k] -> Map k (Pixel RGBA Word8) Source #

From page 41 of Cartographer's Toolkit.

Output and Display

For coloured output, first use classify over your Raster to produce a Raster u p r c (Pixel RGBA Word8). Then unwrap it with _array and output with something like writeImage.

For quick debugging, you can visualize a Raster with displayImage:

raster :: Raster D p 512 512 Word8

>>> displayImage . _array . strict S . grayscale

writeImage :: (Source r Ix2 (Pixel cs e), ColorSpace cs e) => FilePath -> Image r cs e -> IO () #

This function will guess an output file format from the file extension and will write to file any image with the colorspace that is supported by that format. Precision of the image might be adjusted using Elevator if precision of the source array is not supported by the image file format. For instance an (Image r RGBA Double) being saved as PNG file would be written as (Image r RGBA Word16), thus using highest supported precision Word16 for that format. If automatic colors space is also desired, writeImageAuto can be used instead.

Can throw ConvertError, EncodeError and other usual IO errors.

writeImageAuto :: (Source r Ix2 (Pixel cs e), ColorSpace cs e, ToYA cs e, ToRGBA cs e, ToYCbCr cs e, ToCMYK cs e) => FilePath -> Image r cs e -> IO () #

Write an image to file while performing all necessary precisiona and color space conversions.

displayImage :: Writable (Auto TIF) (Image r cs e) => Image r cs e -> IO () #

Makes a call to an external viewer that is set as a default image viewer by the OS. This is a non-blocking function call, so it might take some time before an image will appear.

png :: (Source u Ix2 (Pixel cs a), ColorSpace cs a) => Raster u p r c (Pixel cs a) -> ByteString Source #

Render a PNG-encoded ByteString from a coloured Raster. Useful for returning a Raster from a webserver endpoint.

Projections

class Projection p where Source #

The Earth is not a sphere. Various schemes have been invented throughout history that provide Point coordinates for locations on the earth, although all are approximations and come with trade-offs. We call these Projections, since they are a mapping of Sphere coordinates to some other approximation. The Projection used most commonly for mapping on the internet is called WebMercator.

A Projection is also known as a Coordinate Reference System (CRS).

Use reproject to convert Points between various Projections.

Note: Full support for Projections is still pending.

Methods

toSphere :: Point p -> Point Sphere Source #

Convert a Point in this Projection to one of radians on a perfect Sphere.

fromSphere :: Point Sphere -> Point p Source #

Convert a Point of radians on a perfect sphere to that of a specific Projection.

reproject :: (Projection p, Projection r) => Point p -> Point r Source #

Reproject a Point from one Projection to another.

data Sphere Source #

A perfect geometric sphere. The earth isn't actually shaped this way, but it's a convenient middle-ground for converting between various Projections.

data LatLng Source #

Latitude (north-south position) and Longitude (east-west position).

data WebMercator Source #

The most commonly used Projection for mapping in internet applications.

data Point p Source #

A location on the Earth in some Projection.

Constructors

Point 

Fields

Instances
Eq (Point p) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Point p -> Point p -> Bool #

(/=) :: Point p -> Point p -> Bool #

Show (Point p) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

showsPrec :: Int -> Point p -> ShowS #

show :: Point p -> String #

showList :: [Point p] -> ShowS #

Map Algebra

Local Operations

Operations between Rasters. All operations are element-wise:

1 1 + 2 2  ==  3 3
1 1   2 2      3 3

2 2 * 3 3  ==  6 6
2 2   3 3      6 6

If an operation you need isn't available here, use our zipWith:

zipWith :: (a -> b -> d) -> Raster u p r c a -> Raster u p r c b -> Raster D p r c d

-- Your operation.
foo :: Int -> Int -> Int

bar :: Raster u p r c Int -> Raster u p r c Int -> Raster D p r c Int
bar a b = zipWith foo a b

zipWith :: (Source u Ix2 a, Source u Ix2 b) => (a -> b -> d) -> Raster u p r c a -> Raster u p r c b -> Raster D p r c d Source #

Combine two Rasters, element-wise, with a binary operator.

Unary

If you want to do simple unary Raster -> Raster operations (called LocalCalculation in GaCM), Raster is a Functor so you can use fmap as normal:

myRaster :: Raster D p r c Int

-- Add 17 to every value in the Raster.
fmap (+ 17) myRaster

classify :: (Ord a, Functor f) => b -> Map a b -> f a -> f b Source #

Called LocalClassification in GaCM. The first argument is the value to give to any index whose value is less than the lowest break in the Map.

This is a glorified fmap operation, but we expose it for convenience.

Binary

You can safely use these with the foldl family on any Foldable of Rasters. You would likely want foldl1' which is provided by both List and Vector.

Keep in mind that Raster D has a Num instance, so you can use all the normal math operators with them as well.

lmax :: (Ord a, Source u Ix2 a) => Raster u p r c a -> Raster u p r c a -> Raster D p r c a Source #

Finds the maximum value at each index between two Rasters.

lmin :: (Ord a, Source u Ix2 a) => Raster u p r c a -> Raster u p r c a -> Raster D p r c a Source #

Finds the minimum value at each index between two Rasters.

Other

There is no binary form of these functions that exists without producing numerical error, so you can't use the foldl family with these. Consider the average operation, where the following is not true: \[ \forall abc \in \mathbb{R}. \frac{\frac{a + b}{2} + c}{2} = \frac{a + b + c}{3} \]

lmean :: (Real a, Fractional b, KnownNat r, KnownNat c) => NonEmpty (Raster D p r c a) -> Raster D p r c b Source #

Averages the values per-index of all Rasters in a collection.

lvariety :: (KnownNat r, KnownNat c, Eq a) => NonEmpty (Raster D p r c a) -> Raster D p r c Word Source #

The count of unique values at each shared index.

lmajority :: (KnownNat r, KnownNat c, Ord a) => NonEmpty (Raster D p r c a) -> Raster D p r c a Source #

The most frequently appearing value at each shared index.

lminority :: (KnownNat r, KnownNat c, Ord a) => NonEmpty (Raster D p r c a) -> Raster D p r c a Source #

The least frequently appearing value at each shared index.

lvariance :: forall p a r c. (Real a, KnownNat r, KnownNat c) => NonEmpty (Raster D p r c a) -> Maybe (Raster D p r c Double) Source #

A measure of how spread out a dataset is. This calculation will fail with Nothing if a length 1 list is given.

Focal Operations

Operations on one Raster, given some polygonal neighbourhood. Your Raster must be of a Manifest type (i.e. backed by real memory) before you attempt any focal operations. Without this constraint, wayward users run the risk of setting up operations that would perform terribly. Use strict to easily convert a lazy Raster to a memory-backed one.

myRaster :: Raster D p r c Float

averaged :: Raster DW p r c Float
averaged = fmean $ strict P myRaster

fsum :: (Num a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a Source #

Focal Addition.

fproduct :: (Num a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a Source #

Focal Product.

fmonoid :: (Monoid a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a Source #

Focal Monoid - combine all elements of a neighbourhood via their Monoid instance. In terms of precedence, the neighbourhood focus is the "left-most", and all other elements are "added" to it.

This is not mentioned in GaCM, but seems useful nonetheless.

fmean :: (Fractional a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a Source #

Focal Mean.

fmax :: (Ord a, Bounded a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a Source #

Focal Maximum.

fmin :: (Ord a, Bounded a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a Source #

Focal Minimum.

fmajority :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a Source #

Focal Majority - the most frequently appearing value in each neighbourhood.

fminority :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a Source #

Focal Minority - the least frequently appearing value in each neighbourhood.

fvariety :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Word Source #

Focal Variety - the number of unique values in each neighbourhood.

fpercentage :: (Eq a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Double Source #

Focal Percentage - the percentage of neighbourhood values that are equal to the neighbourhood focus. Not to be confused with fpercentile.

fpercentile :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Double Source #

Focal Percentile - the percentage of neighbourhood values that are less than the neighbourhood focus. Not to be confused with fpercentage.

Lineal

Focal operations that assume that groups of data points represent line-like objects in a Raster. GaCM calls these lineal characteristics and describes them fully on page 18 and 19.

newtype Line Source #

A description of lineal directions with the same encoding as Drain. See flinkage and flength.

Constructors

Line 

Fields

Instances
Eq Line Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Line -> Line -> Bool #

(/=) :: Line -> Line -> Bool #

Ord Line Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

compare :: Line -> Line -> Ordering #

(<) :: Line -> Line -> Bool #

(<=) :: Line -> Line -> Bool #

(>) :: Line -> Line -> Bool #

(>=) :: Line -> Line -> Bool #

max :: Line -> Line -> Line #

min :: Line -> Line -> Line #

Show Line Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

showsPrec :: Int -> Line -> ShowS #

show :: Line -> String #

showList :: [Line] -> ShowS #

Storable Line Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

sizeOf :: Line -> Int #

alignment :: Line -> Int #

peekElemOff :: Ptr Line -> Int -> IO Line #

pokeElemOff :: Ptr Line -> Int -> Line -> IO () #

peekByteOff :: Ptr b -> Int -> IO Line #

pokeByteOff :: Ptr b -> Int -> Line -> IO () #

peek :: Ptr Line -> IO Line #

poke :: Ptr Line -> Line -> IO () #

Default Line Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

def :: Line #

NFData Line Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

rnf :: Line -> () #

Prim Line Source # 
Instance details

Defined in Geography.MapAlgebra

flinkage :: (Default a, Eq a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Line Source #

Focal Linkage - a description of how each neighbourhood focus is connected to its neighbours. Foci of equal value to none of their neighbours will have a value of 0.

flength :: Functor (Raster u p r c) => Raster u p r c Line -> Raster u p r c Double Source #

Focal Length - the length of the lineal structure at every location. The result is in "pixel units", where 1 is the height/width of one pixel.

Areal

Focal operations that assume that groups of data points represent 2D areas in a Raster. GaCM calls these areal characteristics and describes them fully on page 20 and 21.

data Corners Source #

A layout of the areal conditions of a single Raster pixel. It describes whether each pixel corner is occupied by the same "areal zone" as the pixel centre.

Instances
Eq Corners Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Corners -> Corners -> Bool #

(/=) :: Corners -> Corners -> Bool #

Show Corners Source # 
Instance details

Defined in Geography.MapAlgebra

NFData Corners Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

rnf :: Corners -> () #

data Surround Source #

A state of surroundedness of a pixel corner. For the examples below, the bottom-left pixel is considered the focus and we're wondering about the surroundedness of its top-right corner.

Constructors

Complete

A corner has three of the same opponent against it.

The corner is considered "occupied" by the opponent value, thus forming a diagonal areal edge.

[ 1 1 ]
[ 0 1 ]
OneSide

One edge of a corner is touching an opponent, but the other edge touches a friend.

[ 1 1 ]  or  [ 0 1 ]
[ 0 0 ]      [ 0 1 ]
Open

A corner is surrounded by friends.

[ 0 0 ]  or  [ 0 0 ]  or  [ 1 0 ]
[ 0 0 ]      [ 0 1 ]      [ 0 0 ]
RightAngle

Similar to Complete, except that the diagonal opponent doesn't match the other two. The corner is considered surrounded, but not "occupied".

[ 1 2 ]
[ 0 1 ]
OutFlow

Similar to Complete, except that the area of the focus surrounds the diagonal neighbour.

[ 0 1 ]
[ 0 0 ]
Instances
Eq Surround Source # 
Instance details

Defined in Geography.MapAlgebra

Ord Surround Source # 
Instance details

Defined in Geography.MapAlgebra

Show Surround Source # 
Instance details

Defined in Geography.MapAlgebra

NFData Surround Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

rnf :: Surround -> () #

fpartition :: (Default a, Eq a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Corners Source #

Focal Partition - the areal form of each location, only considering the top-right edge.

fshape :: (Default a, Eq a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Corners Source #

Like fpartition, but considers the Surround of all corners. Is alluded to in GaCM but isn't given its own operation name.

If preparing for ffrontage or farea, you almost certainly want this function and not fpartition.

ffrontage :: Functor (Raster u p r c) => Raster u p r c Corners -> Raster u p r c Double Source #

Focal Frontage - the length of areal edges between each pixel and its neighbourhood.

Usually, the output of fshape is the appropriate input for this function.

farea :: Functor (Raster u p r c) => Raster u p r c Corners -> Raster u p r c Double Source #

Focal Area - the area of the shape made up by a neighbourhood focus and its surrounding pixels. Each pixel is assumed to have length and width of 1.

Usually, the output of fshape is the appropriate input for this function.

Surficial

Focal operations that work over elevation Rasters. GaCM calls elevation features surficial characteristics and describes them fully on page 21 and 22.

Some of these operations require finding a "best-fit plane" that approximates the surficial shape of each pixel. Each pixel has 9 "facet points" calculated for it based on its surrounding pixels. We then use these facets to determine a plane which adheres to this equation:

\[ ax + by + c = z \] This is a linear equation that we can solve for in the form \(Ax = B\). For facet points \((x_i, y_i, z_i)\), we have:

\[ \begin{bmatrix} x_0 & y_0 & 1 \\ x_1 & y_1 & 1 \\ \vdots & \vdots & \vdots \\ x_n & y_n & 1 \end{bmatrix} \begin{bmatrix} a\\ b\\ c \end{bmatrix} = \begin{bmatrix} z_0\\ z_1\\ \vdots\\ z_n \end{bmatrix} \]

Since this system of equations is "over determined", we rework the above to find the coefficients of the best-fitting plane via: \[ \begin{bmatrix} a\\ b\\ c \end{bmatrix} = \boxed{(A^{T}A)^{-1}A^{T}}B \] The boxed section is called the "left pseudo inverse" and is available as leftPseudo. The actual values of \(A\) don't matter for our purposes, hence \(A\) can be fixed to avoid redundant calculations.

newtype Drain Source #

The main type for fdownstream and fupstream, used to calculate Focal Drainage. This scheme for encoding drainage patterns is described on page 81 of GaCM.

Full Explanation

Expand

Fluid can flow in or out of a square pixel in one of 256 ways. Imagine a pit, whose neighbours are all higher in elevation: liquid would flow in from all eight compass directions, but no liquid would flow out. Consider then a neighbourhood of random heights - fluid might flow in or out of the focus in any permutation of the eight directions.

The scheme for encoding these permutations in a single Word8 as described in GaCM is this:

Flow in a particular direction is represented by a power of 2:

[  1   2   4  ]
[  8       16 ]
[ 32  64  128 ]

Direction values are summed to make the encoding. If there were drainage to the North, East, and SouthEast, we'd see a sum of \(2 + 16 + 128 = 146\) to uniquely represent this.

Analysing a drainage pattern from a Drain is just as easy: check if the bit corresponding to the desired direction is flipped. The direction function handles this.

Constructors

Drain 

Fields

Instances
Eq Drain Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Drain -> Drain -> Bool #

(/=) :: Drain -> Drain -> Bool #

Ord Drain Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

compare :: Drain -> Drain -> Ordering #

(<) :: Drain -> Drain -> Bool #

(<=) :: Drain -> Drain -> Bool #

(>) :: Drain -> Drain -> Bool #

(>=) :: Drain -> Drain -> Bool #

max :: Drain -> Drain -> Drain #

min :: Drain -> Drain -> Drain #

Show Drain Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

showsPrec :: Int -> Drain -> ShowS #

show :: Drain -> String #

showList :: [Drain] -> ShowS #

Storable Drain Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

sizeOf :: Drain -> Int #

alignment :: Drain -> Int #

peekElemOff :: Ptr Drain -> Int -> IO Drain #

pokeElemOff :: Ptr Drain -> Int -> Drain -> IO () #

peekByteOff :: Ptr b -> Int -> IO Drain #

pokeByteOff :: Ptr b -> Int -> Drain -> IO () #

peek :: Ptr Drain -> IO Drain #

poke :: Ptr Drain -> Drain -> IO () #

Default Drain Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

def :: Drain #

NFData Drain Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

rnf :: Drain -> () #

Prim Drain Source # 
Instance details

Defined in Geography.MapAlgebra

direction :: Direction -> Drain -> Bool Source #

Does a given Drain indicate flow in a certain Direction?

directions :: Drain -> Set Direction Source #

All Directions that a Drain indicates flow toward.

drainage :: Set Direction -> Drain Source #

The opposite of directions.

fvolume :: (Fractional a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a Source #

Focal Volume - the surficial volume under each pixel, assuming the Raster represents elevation in some way.

fgradient :: Manifest u Ix2 Double => Raster u p r c Double -> Raster DW p r c Double Source #

Focal Gradient - a measurement of surficial slope for each pixel relative to the horizonal cartographic plane. Results are in radians, with a flat plane having a slope angle of 0 and a near-vertical plane approaching \(\tau / 4\).

faspect :: Manifest u Ix2 Double => Raster u p r c Double -> Raster DW p r c (Maybe Double) Source #

Focal Aspect - the compass direction toward which the surface descends most rapidly. Results are in radians, with 0 or \(\tau\) being North, \(\tau / 4\) being East, and so on. For areas that are essentially flat, their aspect will be Nothing.

faspect' :: Manifest u Ix2 Double => Raster u p r c Double -> Raster DW p r c Double Source #

Like faspect, but slightly faster. Beware of nonsense results when the plane is flat.

fdownstream :: Manifest u Ix2 Double => Raster u p r c Double -> Raster DW p r c Drain Source #

Focal Drainage - downstream portion. This indicates the one or more compass directions of steepest descent from each location. Appropriate as the input to fupstream.

Note: Peak-like surfaces will not flow equally in all 8 directions. Consider this neighbourhood:

[ 1 1 1 ]
[ 1 3 1 ]
[ 1 1 1 ]

According to the rules in GaCM for calculating the intermediate surficial "facet" points for the focus, 3, we arrive at the following facet height matrix:

[ 1.5 2 1.5 ]
[  2  3  2  ]
[ 1.5 2 1.5 ]

With these numbers it's clear that the corners would yield a steeper angle, so our resulting Drain would only contain the directions of the diagonals.

fupstream :: Manifest u Ix2 Drain => Raster u p r c Drain -> Raster DW p r c Drain Source #

Focal Drainage - upstream portion. This indicates the one of more compass directions from which liquid would flow into each surface location. See also fdownstream.

Utilities

leftPseudo :: Matrix Double Source #

The first part to the "left pseudo inverse" needed to calculate a best-fitting plane of 9 points.

tau :: Double Source #

\(\tau\). One full rotation of the unit circle.

Massiv Re-exports

For your convenience.

data D #

Delayed representation.

Constructors

D 
Instances
Show D 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

showsPrec :: Int -> D -> ShowS #

show :: D -> String #

showList :: [D] -> ShowS #

Num e => Numeric D e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

plusScalar :: Index ix => Array D ix e -> e -> Array D ix e #

minusScalar :: Index ix => Array D ix e -> e -> Array D ix e #

multiplyScalar :: Index ix => Array D ix e -> e -> Array D ix e #

absPointwise :: Index ix => Array D ix e -> Array D ix e #

additionPointwise :: Index ix => Array D ix e -> Array D ix e -> Array D ix e #

subtractionPointwise :: Index ix => Array D ix e -> Array D ix e -> Array D ix e #

multiplicationPointwise :: Index ix => Array D ix e -> Array D ix e -> Array D ix e #

powerPointwise :: Index ix => Array D ix e -> Int -> Array D ix e #

unsafeLiftArray :: Index ix => (a -> e) -> Array D ix a -> Array D ix e #

unsafeLiftArray2 :: Index ix => (a -> b -> e) -> Array D ix a -> Array D ix b -> Array D ix e #

Floating e => NumericFloat D e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

divideScalar :: Index ix => Array D ix e -> e -> Array D ix e #

divisionPointwise :: Index ix => Array D ix e -> Array D ix e -> Array D ix e #

recipPointwise :: Index ix => Array D ix e -> Array D ix e #

sqrtPointwise :: Index ix => Array D ix e -> Array D ix e #

Index ix => Resize D ix 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeResize :: Index ix' => Sz ix' -> Array D ix e -> Array D ix' e #

Index ix => Stream D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

toStream :: Array D ix e -> Steps Id e #

Index ix => Construct D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

setComp :: Comp -> Array D ix e -> Array D ix e #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array D ix e #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array D ix e #

Index ix => Extract D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeExtract :: ix -> Sz ix -> Array D ix e -> Array (R D) ix e #

Index ix => Source D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeIndex :: Array D ix e -> ix -> e #

unsafeLinearIndex :: Array D ix e -> Int -> e #

Index ix => Load D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Associated Types

type R D :: Type #

Methods

getComp :: Array D ix e -> Comp #

size :: Array D ix e -> Sz ix #

loadArrayM :: Monad m => Scheduler m () -> Array D ix e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array D ix e -> Maybe e #

maxSize :: Array D ix e -> Maybe (Sz ix)

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array D ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array D ix e -> m (MArray RealWorld r' ix e)

Index ix => StrideLoad D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array D ix e -> (Int -> e -> m ()) -> m () #

(Elt D ix e ~ Array D (Lower ix) e, Index ix) => OuterSlice D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeOuterSlice :: Array D ix e -> Int -> Elt D ix e #

(Elt D ix e ~ Array D (Lower ix) e, Index ix) => InnerSlice D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeInnerSlice :: Array D ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt D ix e #

(Index ix, Index (Lower ix), Elt D ix e ~ Array D (Lower ix) e) => Slice D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeSlice :: MonadThrow m => Array D ix e -> ix -> Sz ix -> Dim -> m (Elt D ix e) #

Functor (Array D ix) 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

fmap :: (a -> b) -> Array D ix a -> Array D ix b #

(<$) :: a -> Array D ix b -> Array D ix a #

Index ix => Applicative (Array D ix) 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

pure :: a -> Array D ix a #

(<*>) :: Array D ix (a -> b) -> Array D ix a -> Array D ix b #

liftA2 :: (a -> b -> c) -> Array D ix a -> Array D ix b -> Array D ix c #

(*>) :: Array D ix a -> Array D ix b -> Array D ix b #

(<*) :: Array D ix a -> Array D ix b -> Array D ix a #

Index ix => Foldable (Array D ix)

Row-major sequential folding over a Delayed array.

Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

fold :: Monoid m => Array D ix m -> m #

foldMap :: Monoid m => (a -> m) -> Array D ix a -> m #

foldr :: (a -> b -> b) -> b -> Array D ix a -> b #

foldr' :: (a -> b -> b) -> b -> Array D ix a -> b #

foldl :: (b -> a -> b) -> b -> Array D ix a -> b #

foldl' :: (b -> a -> b) -> b -> Array D ix a -> b #

foldr1 :: (a -> a -> a) -> Array D ix a -> a #

foldl1 :: (a -> a -> a) -> Array D ix a -> a #

toList :: Array D ix a -> [a] #

null :: Array D ix a -> Bool #

length :: Array D ix a -> Int #

elem :: Eq a => a -> Array D ix a -> Bool #

maximum :: Ord a => Array D ix a -> a #

minimum :: Ord a => Array D ix a -> a #

sum :: Num a => Array D ix a -> a #

product :: Num a => Array D ix a -> a #

(Eq e, Index ix) => Eq (Array D ix e) 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

(==) :: Array D ix e -> Array D ix e -> Bool #

(/=) :: Array D ix e -> Array D ix e -> Bool #

(Index ix, Floating e) => Floating (Array D ix e) 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

pi :: Array D ix e #

exp :: Array D ix e -> Array D ix e #

log :: Array D ix e -> Array D ix e #

sqrt :: Array D ix e -> Array D ix e #

(**) :: Array D ix e -> Array D ix e -> Array D ix e #

logBase :: Array D ix e -> Array D ix e -> Array D ix e #

sin :: Array D ix e -> Array D ix e #

cos :: Array D ix e -> Array D ix e #

tan :: Array D ix e -> Array D ix e #

asin :: Array D ix e -> Array D ix e #

acos :: Array D ix e -> Array D ix e #

atan :: Array D ix e -> Array D ix e #

sinh :: Array D ix e -> Array D ix e #

cosh :: Array D ix e -> Array D ix e #

tanh :: Array D ix e -> Array D ix e #

asinh :: Array D ix e -> Array D ix e #

acosh :: Array D ix e -> Array D ix e #

atanh :: Array D ix e -> Array D ix e #

log1p :: Array D ix e -> Array D ix e #

expm1 :: Array D ix e -> Array D ix e #

log1pexp :: Array D ix e -> Array D ix e #

log1mexp :: Array D ix e -> Array D ix e #

(Index ix, Fractional e) => Fractional (Array D ix e) 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

(/) :: Array D ix e -> Array D ix e -> Array D ix e #

recip :: Array D ix e -> Array D ix e #

fromRational :: Rational -> Array D ix e #

(Index ix, Num e) => Num (Array D ix e) 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

(+) :: Array D ix e -> Array D ix e -> Array D ix e #

(-) :: Array D ix e -> Array D ix e -> Array D ix e #

(*) :: Array D ix e -> Array D ix e -> Array D ix e #

negate :: Array D ix e -> Array D ix e #

abs :: Array D ix e -> Array D ix e #

signum :: Array D ix e -> Array D ix e #

fromInteger :: Integer -> Array D ix e #

(Ord e, Index ix) => Ord (Array D ix e) 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

compare :: Array D ix e -> Array D ix e -> Ordering #

(<) :: Array D ix e -> Array D ix e -> Bool #

(<=) :: Array D ix e -> Array D ix e -> Bool #

(>) :: Array D ix e -> Array D ix e -> Bool #

(>=) :: Array D ix e -> Array D ix e -> Bool #

max :: Array D ix e -> Array D ix e -> Array D ix e #

min :: Array D ix e -> Array D ix e -> Array D ix e #

(Ragged L ix e, Show e) => Show (Array D ix e) 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

showsPrec :: Int -> Array D ix e -> ShowS #

show :: Array D ix e -> String #

showList :: [Array D ix e] -> ShowS #

Functor (Raster D p r c) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

fmap :: (a -> b) -> Raster D p r c a -> Raster D p r c b #

(<$) :: a -> Raster D p r c b -> Raster D p r c a #

(KnownNat r, KnownNat c) => Applicative (Raster D p r c) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

pure :: a -> Raster D p r c a #

(<*>) :: Raster D p r c (a -> b) -> Raster D p r c a -> Raster D p r c b #

liftA2 :: (a -> b -> c0) -> Raster D p r c a -> Raster D p r c b -> Raster D p r c c0 #

(*>) :: Raster D p r c a -> Raster D p r c b -> Raster D p r c b #

(<*) :: Raster D p r c a -> Raster D p r c b -> Raster D p r c a #

Foldable (Raster D p r c) Source #

length has a specialized \(\mathcal{O}(1)\) implementation.

Instance details

Defined in Geography.MapAlgebra

Methods

fold :: Monoid m => Raster D p r c m -> m #

foldMap :: Monoid m => (a -> m) -> Raster D p r c a -> m #

foldr :: (a -> b -> b) -> b -> Raster D p r c a -> b #

foldr' :: (a -> b -> b) -> b -> Raster D p r c a -> b #

foldl :: (b -> a -> b) -> b -> Raster D p r c a -> b #

foldl' :: (b -> a -> b) -> b -> Raster D p r c a -> b #

foldr1 :: (a -> a -> a) -> Raster D p r c a -> a #

foldl1 :: (a -> a -> a) -> Raster D p r c a -> a #

toList :: Raster D p r c a -> [a] #

null :: Raster D p r c a -> Bool #

length :: Raster D p r c a -> Int #

elem :: Eq a => a -> Raster D p r c a -> Bool #

maximum :: Ord a => Raster D p r c a -> a #

minimum :: Ord a => Raster D p r c a -> a #

sum :: Num a => Raster D p r c a -> a #

product :: Num a => Raster D p r c a -> a #

Eq a => Eq (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster D p r c a -> Raster D p r c a -> Bool #

(/=) :: Raster D p r c a -> Raster D p r c a -> Bool #

(Fractional a, KnownNat r, KnownNat c) => Fractional (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(/) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

recip :: Raster D p r c a -> Raster D p r c a #

fromRational :: Rational -> Raster D p r c a #

(Num a, KnownNat r, KnownNat c) => Num (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(+) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

(-) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

(*) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

negate :: Raster D p r c a -> Raster D p r c a #

abs :: Raster D p r c a -> Raster D p r c a #

signum :: Raster D p r c a -> Raster D p r c a #

fromInteger :: Integer -> Raster D p r c a #

Semigroup a => Semigroup (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(<>) :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

sconcat :: NonEmpty (Raster D p r c a) -> Raster D p r c a #

stimes :: Integral b => b -> Raster D p r c a -> Raster D p r c a #

(Monoid a, KnownNat r, KnownNat c) => Monoid (Raster D p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

mempty :: Raster D p r c a #

mappend :: Raster D p r c a -> Raster D p r c a -> Raster D p r c a #

mconcat :: [Raster D p r c a] -> Raster D p r c a #

data Array D ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

data Array D ix e = DArray {}
type R D 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

type R D = D

data DW #

Delayed Windowed Array representation.

Constructors

DW 
Instances
Index ix => Construct DW ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

setComp :: Comp -> Array DW ix e -> Array DW ix e #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array DW ix e #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array DW ix e #

Load DW Ix2T e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type #

Methods

getComp :: Array DW Ix2T e -> Comp #

size :: Array DW Ix2T e -> Sz Ix2T #

loadArrayM :: Monad m => Scheduler m () -> Array DW Ix2T e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array DW Ix2T e -> Maybe e #

maxSize :: Array DW Ix2T e -> Maybe (Sz Ix2T)

unsafeLoadIntoS :: (Mutable r' Ix2T e, PrimMonad m) => MArray (PrimState m) r' Ix2T e -> Array DW Ix2T e -> m (MArray (PrimState m) r' Ix2T e)

unsafeLoadInto :: (Mutable r' Ix2T e, MonadIO m) => MArray RealWorld r' Ix2T e -> Array DW Ix2T e -> m (MArray RealWorld r' Ix2T e)

Load DW Ix3T e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type #

Methods

getComp :: Array DW Ix3T e -> Comp #

size :: Array DW Ix3T e -> Sz Ix3T #

loadArrayM :: Monad m => Scheduler m () -> Array DW Ix3T e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array DW Ix3T e -> Maybe e #

maxSize :: Array DW Ix3T e -> Maybe (Sz Ix3T)

unsafeLoadIntoS :: (Mutable r' Ix3T e, PrimMonad m) => MArray (PrimState m) r' Ix3T e -> Array DW Ix3T e -> m (MArray (PrimState m) r' Ix3T e)

unsafeLoadInto :: (Mutable r' Ix3T e, MonadIO m) => MArray RealWorld r' Ix3T e -> Array DW Ix3T e -> m (MArray RealWorld r' Ix3T e)

Load DW Ix4T e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type #

Methods

getComp :: Array DW Ix4T e -> Comp #

size :: Array DW Ix4T e -> Sz Ix4T #

loadArrayM :: Monad m => Scheduler m () -> Array DW Ix4T e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array DW Ix4T e -> Maybe e #

maxSize :: Array DW Ix4T e -> Maybe (Sz Ix4T)

unsafeLoadIntoS :: (Mutable r' Ix4T e, PrimMonad m) => MArray (PrimState m) r' Ix4T e -> Array DW Ix4T e -> m (MArray (PrimState m) r' Ix4T e)

unsafeLoadInto :: (Mutable r' Ix4T e, MonadIO m) => MArray RealWorld r' Ix4T e -> Array DW Ix4T e -> m (MArray RealWorld r' Ix4T e)

Load DW Ix5T e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type #

Methods

getComp :: Array DW Ix5T e -> Comp #

size :: Array DW Ix5T e -> Sz Ix5T #

loadArrayM :: Monad m => Scheduler m () -> Array DW Ix5T e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array DW Ix5T e -> Maybe e #

maxSize :: Array DW Ix5T e -> Maybe (Sz Ix5T)

unsafeLoadIntoS :: (Mutable r' Ix5T e, PrimMonad m) => MArray (PrimState m) r' Ix5T e -> Array DW Ix5T e -> m (MArray (PrimState m) r' Ix5T e)

unsafeLoadInto :: (Mutable r' Ix5T e, MonadIO m) => MArray RealWorld r' Ix5T e -> Array DW Ix5T e -> m (MArray RealWorld r' Ix5T e)

Load DW Ix2 e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type #

Methods

getComp :: Array DW Ix2 e -> Comp #

size :: Array DW Ix2 e -> Sz Ix2 #

loadArrayM :: Monad m => Scheduler m () -> Array DW Ix2 e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array DW Ix2 e -> Maybe e #

maxSize :: Array DW Ix2 e -> Maybe (Sz Ix2)

unsafeLoadIntoS :: (Mutable r' Ix2 e, PrimMonad m) => MArray (PrimState m) r' Ix2 e -> Array DW Ix2 e -> m (MArray (PrimState m) r' Ix2 e)

unsafeLoadInto :: (Mutable r' Ix2 e, MonadIO m) => MArray RealWorld r' Ix2 e -> Array DW Ix2 e -> m (MArray RealWorld r' Ix2 e)

Load DW Ix1 e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type #

Methods

getComp :: Array DW Ix1 e -> Comp #

size :: Array DW Ix1 e -> Sz Ix1 #

loadArrayM :: Monad m => Scheduler m () -> Array DW Ix1 e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array DW Ix1 e -> Maybe e #

maxSize :: Array DW Ix1 e -> Maybe (Sz Ix1)

unsafeLoadIntoS :: (Mutable r' Ix1 e, PrimMonad m) => MArray (PrimState m) r' Ix1 e -> Array DW Ix1 e -> m (MArray (PrimState m) r' Ix1 e)

unsafeLoadInto :: (Mutable r' Ix1 e, MonadIO m) => MArray RealWorld r' Ix1 e -> Array DW Ix1 e -> m (MArray RealWorld r' Ix1 e)

StrideLoad DW Ix2T e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix2T -> Sz Ix2T -> Array DW Ix2T e -> (Int -> e -> m ()) -> m () #

StrideLoad DW Ix3T e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix3T -> Sz Ix3T -> Array DW Ix3T e -> (Int -> e -> m ()) -> m () #

StrideLoad DW Ix4T e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix4T -> Sz Ix4T -> Array DW Ix4T e -> (Int -> e -> m ()) -> m () #

StrideLoad DW Ix5T e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix5T -> Sz Ix5T -> Array DW Ix5T e -> (Int -> e -> m ()) -> m () #

StrideLoad DW Ix2 e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix2 -> Sz Ix2 -> Array DW Ix2 e -> (Int -> e -> m ()) -> m () #

StrideLoad DW Ix1 e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix1 -> Sz Ix1 -> Array DW Ix1 e -> (Int -> e -> m ()) -> m () #

(Index (IxN n), Load DW (Ix (n - 1)) e) => Load DW (IxN n) e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type #

Methods

getComp :: Array DW (IxN n) e -> Comp #

size :: Array DW (IxN n) e -> Sz (IxN n) #

loadArrayM :: Monad m => Scheduler m () -> Array DW (IxN n) e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array DW (IxN n) e -> Maybe e #

maxSize :: Array DW (IxN n) e -> Maybe (Sz (IxN n))

unsafeLoadIntoS :: (Mutable r' (IxN n) e, PrimMonad m) => MArray (PrimState m) r' (IxN n) e -> Array DW (IxN n) e -> m (MArray (PrimState m) r' (IxN n) e)

unsafeLoadInto :: (Mutable r' (IxN n) e, MonadIO m) => MArray RealWorld r' (IxN n) e -> Array DW (IxN n) e -> m (MArray RealWorld r' (IxN n) e)

(Index (IxN n), StrideLoad DW (Ix (n - 1)) e) => StrideLoad DW (IxN n) e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride (IxN n) -> Sz (IxN n) -> Array DW (IxN n) e -> (Int -> e -> m ()) -> m () #

Functor (Array DW ix) 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

fmap :: (a -> b) -> Array DW ix a -> Array DW ix b #

(<$) :: a -> Array DW ix b -> Array DW ix a #

(Ragged L ix e, Load DW ix e, Show e) => Show (Array DW ix e) 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

showsPrec :: Int -> Array DW ix e -> ShowS #

show :: Array DW ix e -> String #

showList :: [Array DW ix e] -> ShowS #

Functor (Raster DW p r c) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

fmap :: (a -> b) -> Raster DW p r c a -> Raster DW p r c b #

(<$) :: a -> Raster DW p r c b -> Raster DW p r c a #

data Array DW ix e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

data Array DW ix e = DWArray {}
type R DW 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

type R DW = DW
type R DW 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

type R DW = DW
type R DW 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

type R DW = DW
type R DW 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

type R DW = DW
type R DW 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

type R DW = DW
type R DW 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

type R DW = DW
type R DW 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

type R DW = DW

data S #

Representation for Storable elements

Constructors

S 
Instances
Show S 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

showsPrec :: Int -> S -> ShowS #

show :: S -> String #

showList :: [S] -> ShowS #

Index ix => Resize S ix 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeResize :: Index ix' => Sz ix' -> Array S ix e -> Array S ix' e #

(Index ix, Storable e) => Stream S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

toStream :: Array S ix e -> Steps Id e #

(Storable e, Index ix) => Construct S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

setComp :: Comp -> Array S ix e -> Array S ix e #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array S ix e #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array S ix e #

(Storable e, Index ix) => Extract S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeExtract :: ix -> Sz ix -> Array S ix e -> Array (R S) ix e #

(Storable e, Index ix) => Source S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeIndex :: Array S ix e -> ix -> e #

unsafeLinearIndex :: Array S ix e -> Int -> e #

(Index ix, Storable e) => Load S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Associated Types

type R S :: Type #

Methods

getComp :: Array S ix e -> Comp #

size :: Array S ix e -> Sz ix #

loadArrayM :: Monad m => Scheduler m () -> Array S ix e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array S ix e -> Maybe e #

maxSize :: Array S ix e -> Maybe (Sz ix)

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array S ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array S ix e -> m (MArray RealWorld r' ix e)

(Index ix, Storable e) => StrideLoad S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array S ix e -> (Int -> e -> m ()) -> m () #

(Storable e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt S ix e ~ Array M (Lower ix) e) => OuterSlice S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeOuterSlice :: Array S ix e -> Int -> Elt S ix e #

(Storable e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt S ix e ~ Array M (Lower ix) e) => InnerSlice S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeInnerSlice :: Array S ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt S ix e #

Storable e => Slice S Ix1 e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeSlice :: MonadThrow m => Array S Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt S Ix1 e) #

(Index ix, Storable e) => Manifest S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeLinearIndexM :: Array S ix e -> Int -> e #

(Index ix, Storable e) => Mutable S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Associated Types

data MArray s S ix e :: Type #

Methods

msize :: MArray s S ix e -> Sz ix #

unsafeThaw :: PrimMonad m => Array S ix e -> m (MArray (PrimState m) S ix e) #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) S ix e -> m (Array S ix e) #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) S ix e) #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) S ix e -> Int -> m e #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) S ix e -> Int -> e -> m () #

initialize :: PrimMonad m => MArray (PrimState m) S ix e -> m () #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) S ix e) #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) S ix e -> Ix1 -> Sz1 -> e -> m () #

unsafeLinearCopy :: (Mutable S ix' e, PrimMonad m) => MArray (PrimState m) S ix' e -> Ix1 -> MArray (PrimState m) S ix e -> Ix1 -> Sz1 -> m () #

unsafeArrayLinearCopy :: (Mutable S ix' e, PrimMonad m) => Array S ix' e -> Ix1 -> MArray (PrimState m) S ix e -> Ix1 -> Sz1 -> m () #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) S ix e -> Sz ix -> m (MArray (PrimState m) S ix e) #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) S ix e -> Sz ix -> m (MArray (PrimState m) S ix e) #

ColorSpace cs e => Readable PBM (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

decode :: PBM -> ReadOptions PBM -> ByteString -> Image S cs e #

ColorSpace cs e => Readable PGM (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

decode :: PGM -> ReadOptions PGM -> ByteString -> Image S cs e #

ColorSpace cs e => Readable PPM (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

decode :: PPM -> ReadOptions PPM -> ByteString -> Image S cs e #

ColorSpace cs e => Readable BMP (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: BMP -> ReadOptions BMP -> ByteString -> Image S cs e #

ColorSpace cs e => Readable PNG (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: PNG -> ReadOptions PNG -> ByteString -> Image S cs e #

ColorSpace cs e => Readable GIF (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: GIF -> ReadOptions GIF -> ByteString -> Image S cs e #

ColorSpace cs e => Readable HDR (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: HDR -> ReadOptions HDR -> ByteString -> Image S cs e #

ColorSpace cs e => Readable JPG (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: JPG -> ReadOptions JPG -> ByteString -> Image S cs e #

ColorSpace cs e => Readable TGA (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: TGA -> ReadOptions TGA -> ByteString -> Image S cs e #

ColorSpace cs e => Readable TIF (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: TIF -> ReadOptions TIF -> ByteString -> Image S cs e #

ColorSpace cs e => Readable (Sequence PBM) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

ColorSpace cs e => Readable (Sequence PGM) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

ColorSpace cs e => Readable (Sequence PPM) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (GifDelay, Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

(Storable e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array S ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Associated Types

type Item (Array S ix e) :: Type #

Methods

fromList :: [Item (Array S ix e)] -> Array S ix e #

fromListN :: Int -> [Item (Array S ix e)] -> Array S ix e #

toList :: Array S ix e -> [Item (Array S ix e)] #

(Storable e, Eq e, Index ix) => Eq (Array S ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

(==) :: Array S ix e -> Array S ix e -> Bool #

(/=) :: Array S ix e -> Array S ix e -> Bool #

(Storable e, Ord e, Index ix) => Ord (Array S ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

compare :: Array S ix e -> Array S ix e -> Ordering #

(<) :: Array S ix e -> Array S ix e -> Bool #

(<=) :: Array S ix e -> Array S ix e -> Bool #

(>) :: Array S ix e -> Array S ix e -> Bool #

(>=) :: Array S ix e -> Array S ix e -> Bool #

max :: Array S ix e -> Array S ix e -> Array S ix e #

min :: Array S ix e -> Array S ix e -> Array S ix e #

(Ragged L ix e, Show e, Storable e) => Show (Array S ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

showsPrec :: Int -> Array S ix e -> ShowS #

show :: Array S ix e -> String #

showList :: [Array S ix e] -> ShowS #

NFData ix => NFData (Array S ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

rnf :: Array S ix e -> () #

(Eq a, Storable a) => Eq (Raster S p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster S p r c a -> Raster S p r c a -> Bool #

(/=) :: Raster S p r c a -> Raster S p r c a -> Bool #

data Array S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

data Array S ix e = SArray {}
type R S 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

type R S = M
data MArray s S ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

data MArray s S ix e = MSArray !(Sz ix) !(MVector s e)
type Item (Array S ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

type Item (Array S ix e) = Item (Array L ix e)

data P #

Representation for Primitive elements

Constructors

P 
Instances
Show P 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

showsPrec :: Int -> P -> ShowS #

show :: P -> String #

showList :: [P] -> ShowS #

Index ix => Resize P ix 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeResize :: Index ix' => Sz ix' -> Array P ix e -> Array P ix' e #

(Prim e, Index ix) => Stream P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

toStream :: Array P ix e -> Steps Id e #

(Prim e, Index ix) => Construct P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

setComp :: Comp -> Array P ix e -> Array P ix e #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array P ix e #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array P ix e #

(Prim e, Index ix) => Extract P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeExtract :: ix -> Sz ix -> Array P ix e -> Array (R P) ix e #

(Prim e, Index ix) => Source P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeIndex :: Array P ix e -> ix -> e #

unsafeLinearIndex :: Array P ix e -> Int -> e #

(Prim e, Index ix) => Load P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Associated Types

type R P :: Type #

Methods

getComp :: Array P ix e -> Comp #

size :: Array P ix e -> Sz ix #

loadArrayM :: Monad m => Scheduler m () -> Array P ix e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array P ix e -> Maybe e #

maxSize :: Array P ix e -> Maybe (Sz ix)

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array P ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array P ix e -> m (MArray RealWorld r' ix e)

(Prim e, Index ix) => StrideLoad P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array P ix e -> (Int -> e -> m ()) -> m () #

(Prim e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt P ix e ~ Array M (Lower ix) e) => OuterSlice P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeOuterSlice :: Array P ix e -> Int -> Elt P ix e #

Prim e => OuterSlice P Ix1 e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeOuterSlice :: Array P Ix1 e -> Int -> Elt P Ix1 e #

(Prim e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt P ix e ~ Array M (Lower ix) e) => InnerSlice P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeInnerSlice :: Array P ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt P ix e #

Prim e => InnerSlice P Ix1 e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeInnerSlice :: Array P Ix1 e -> (Sz (Lower Ix1), Sz Int) -> Int -> Elt P Ix1 e #

(Prim e, Index ix, Index (Lower ix), Elt P ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => Slice P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeSlice :: MonadThrow m => Array P ix e -> ix -> Sz ix -> Dim -> m (Elt P ix e) #

Prim e => Slice P Ix1 e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeSlice :: MonadThrow m => Array P Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt P Ix1 e) #

(Index ix, Prim e) => Manifest P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeLinearIndexM :: Array P ix e -> Int -> e #

(Index ix, Prim e) => Mutable P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Associated Types

data MArray s P ix e :: Type #

Methods

msize :: MArray s P ix e -> Sz ix #

unsafeThaw :: PrimMonad m => Array P ix e -> m (MArray (PrimState m) P ix e) #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) P ix e -> m (Array P ix e) #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) P ix e) #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) P ix e -> Int -> m e #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) P ix e -> Int -> e -> m () #

initialize :: PrimMonad m => MArray (PrimState m) P ix e -> m () #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) P ix e) #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) P ix e -> Ix1 -> Sz1 -> e -> m () #

unsafeLinearCopy :: (Mutable P ix' e, PrimMonad m) => MArray (PrimState m) P ix' e -> Ix1 -> MArray (PrimState m) P ix e -> Ix1 -> Sz1 -> m () #

unsafeArrayLinearCopy :: (Mutable P ix' e, PrimMonad m) => Array P ix' e -> Ix1 -> MArray (PrimState m) P ix e -> Ix1 -> Sz1 -> m () #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) P ix e -> Sz ix -> m (MArray (PrimState m) P ix e) #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) P ix e -> Sz ix -> m (MArray (PrimState m) P ix e) #

(Prim e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array P ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Associated Types

type Item (Array P ix e) :: Type #

Methods

fromList :: [Item (Array P ix e)] -> Array P ix e #

fromListN :: Int -> [Item (Array P ix e)] -> Array P ix e #

toList :: Array P ix e -> [Item (Array P ix e)] #

(Prim e, Eq e, Index ix) => Eq (Array P ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

(==) :: Array P ix e -> Array P ix e -> Bool #

(/=) :: Array P ix e -> Array P ix e -> Bool #

(Prim e, Ord e, Index ix) => Ord (Array P ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

compare :: Array P ix e -> Array P ix e -> Ordering #

(<) :: Array P ix e -> Array P ix e -> Bool #

(<=) :: Array P ix e -> Array P ix e -> Bool #

(>) :: Array P ix e -> Array P ix e -> Bool #

(>=) :: Array P ix e -> Array P ix e -> Bool #

max :: Array P ix e -> Array P ix e -> Array P ix e #

min :: Array P ix e -> Array P ix e -> Array P ix e #

(Ragged L ix e, Show e, Prim e) => Show (Array P ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

showsPrec :: Int -> Array P ix e -> ShowS #

show :: Array P ix e -> String #

showList :: [Array P ix e] -> ShowS #

Index ix => NFData (Array P ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

rnf :: Array P ix e -> () #

(Eq a, Prim a) => Eq (Raster P p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster P p r c a -> Raster P p r c a -> Bool #

(/=) :: Raster P p r c a -> Raster P p r c a -> Bool #

data Array P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

data Array P ix e = PArray {}
type R P 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

type R P = M
data MArray s P ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

data MArray s P ix e = MPArray !(Sz ix) !(MutableByteArray s)
type Item (Array P ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

type Item (Array P ix e) = Item (Array L ix e)

data U #

Representation for Unboxed elements

Constructors

U 
Instances
Show U 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

showsPrec :: Int -> U -> ShowS #

show :: U -> String #

showList :: [U] -> ShowS #

Index ix => Resize U ix 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeResize :: Index ix' => Sz ix' -> Array U ix e -> Array U ix' e #

(Index ix, Unbox e) => Stream U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

toStream :: Array U ix e -> Steps Id e #

(Unbox e, Index ix) => Construct U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

setComp :: Comp -> Array U ix e -> Array U ix e #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array U ix e #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array U ix e #

(Unbox e, Index ix) => Extract U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeExtract :: ix -> Sz ix -> Array U ix e -> Array (R U) ix e #

(Unbox e, Index ix) => Source U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeIndex :: Array U ix e -> ix -> e #

unsafeLinearIndex :: Array U ix e -> Int -> e #

(Unbox e, Index ix) => Load U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Associated Types

type R U :: Type #

Methods

getComp :: Array U ix e -> Comp #

size :: Array U ix e -> Sz ix #

loadArrayM :: Monad m => Scheduler m () -> Array U ix e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array U ix e -> Maybe e #

maxSize :: Array U ix e -> Maybe (Sz ix)

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array U ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array U ix e -> m (MArray RealWorld r' ix e)

(Unbox e, Index ix) => StrideLoad U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array U ix e -> (Int -> e -> m ()) -> m () #

(Unbox e, Index ix, Index (Lower ix), Elt U ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => OuterSlice U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeOuterSlice :: Array U ix e -> Int -> Elt U ix e #

Unbox e => OuterSlice U Ix1 e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeOuterSlice :: Array U Ix1 e -> Int -> Elt U Ix1 e #

(Unbox e, Index ix, Index (Lower ix), Elt U ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => InnerSlice U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeInnerSlice :: Array U ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt U ix e #

Unbox e => InnerSlice U Ix1 e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeInnerSlice :: Array U Ix1 e -> (Sz (Lower Ix1), Sz Int) -> Int -> Elt U Ix1 e #

(Unbox e, Index ix, Index (Lower ix), Elt U ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => Slice U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeSlice :: MonadThrow m => Array U ix e -> ix -> Sz ix -> Dim -> m (Elt U ix e) #

Unbox e => Slice U Ix1 e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeSlice :: MonadThrow m => Array U Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt U Ix1 e) #

(Unbox e, Index ix) => Manifest U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeLinearIndexM :: Array U ix e -> Int -> e #

(Unbox e, Index ix) => Mutable U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Associated Types

data MArray s U ix e :: Type #

Methods

msize :: MArray s U ix e -> Sz ix #

unsafeThaw :: PrimMonad m => Array U ix e -> m (MArray (PrimState m) U ix e) #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) U ix e -> m (Array U ix e) #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) U ix e) #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) U ix e -> Int -> m e #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) U ix e -> Int -> e -> m () #

initialize :: PrimMonad m => MArray (PrimState m) U ix e -> m () #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) U ix e) #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) U ix e -> Ix1 -> Sz1 -> e -> m () #

unsafeLinearCopy :: (Mutable U ix' e, PrimMonad m) => MArray (PrimState m) U ix' e -> Ix1 -> MArray (PrimState m) U ix e -> Ix1 -> Sz1 -> m () #

unsafeArrayLinearCopy :: (Mutable U ix' e, PrimMonad m) => Array U ix' e -> Ix1 -> MArray (PrimState m) U ix e -> Ix1 -> Sz1 -> m () #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) U ix e -> Sz ix -> m (MArray (PrimState m) U ix e) #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) U ix e -> Sz ix -> m (MArray (PrimState m) U ix e) #

(Unbox e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array U ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Associated Types

type Item (Array U ix e) :: Type #

Methods

fromList :: [Item (Array U ix e)] -> Array U ix e #

fromListN :: Int -> [Item (Array U ix e)] -> Array U ix e #

toList :: Array U ix e -> [Item (Array U ix e)] #

(Unbox e, Eq e, Index ix) => Eq (Array U ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

(==) :: Array U ix e -> Array U ix e -> Bool #

(/=) :: Array U ix e -> Array U ix e -> Bool #

(Unbox e, Ord e, Index ix) => Ord (Array U ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

compare :: Array U ix e -> Array U ix e -> Ordering #

(<) :: Array U ix e -> Array U ix e -> Bool #

(<=) :: Array U ix e -> Array U ix e -> Bool #

(>) :: Array U ix e -> Array U ix e -> Bool #

(>=) :: Array U ix e -> Array U ix e -> Bool #

max :: Array U ix e -> Array U ix e -> Array U ix e #

min :: Array U ix e -> Array U ix e -> Array U ix e #

(Ragged L ix e, Show e, Unbox e) => Show (Array U ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

showsPrec :: Int -> Array U ix e -> ShowS #

show :: Array U ix e -> String #

showList :: [Array U ix e] -> ShowS #

NFData ix => NFData (Array U ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

rnf :: Array U ix e -> () #

(Eq a, Unbox a) => Eq (Raster U p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster U p r c a -> Raster U p r c a -> Bool #

(/=) :: Raster U p r c a -> Raster U p r c a -> Bool #

data Array U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

data Array U ix e = UArray {}
type R U 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

type R U = M
data MArray s U ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

data MArray s U ix e = MUArray !(Sz ix) !(MVector s e)
type Item (Array U ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

type Item (Array U ix e) = Item (Array L ix e)

data B #

Array representation for Boxed elements. This structure is element and spine strict, but elements are strict to Weak Head Normal Form (WHNF) only.

Constructors

B 
Instances
Show B 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

showsPrec :: Int -> B -> ShowS #

show :: B -> String #

showList :: [B] -> ShowS #

Index ix => Resize B ix 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeResize :: Index ix' => Sz ix' -> Array B ix e -> Array B ix' e #

Index ix => Stream B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

toStream :: Array B ix e -> Steps Id e #

Index ix => Construct B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

setComp :: Comp -> Array B ix e -> Array B ix e #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array B ix e #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array B ix e #

Index ix => Extract B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeExtract :: ix -> Sz ix -> Array B ix e -> Array (R B) ix e #

Index ix => Source B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeIndex :: Array B ix e -> ix -> e #

unsafeLinearIndex :: Array B ix e -> Int -> e #

Index ix => Load B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

type R B :: Type #

Methods

getComp :: Array B ix e -> Comp #

size :: Array B ix e -> Sz ix #

loadArrayM :: Monad m => Scheduler m () -> Array B ix e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array B ix e -> Maybe e #

maxSize :: Array B ix e -> Maybe (Sz ix)

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array B ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array B ix e -> m (MArray RealWorld r' ix e)

Index ix => StrideLoad B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array B ix e -> (Int -> e -> m ()) -> m () #

(Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt B ix e ~ Array M (Lower ix) e) => OuterSlice B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeOuterSlice :: Array B ix e -> Int -> Elt B ix e #

(Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt B ix e ~ Array M (Lower ix) e) => InnerSlice B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeInnerSlice :: Array B ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt B ix e #

Slice B Ix1 e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeSlice :: MonadThrow m => Array B Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt B Ix1 e) #

Index ix => Manifest B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeLinearIndexM :: Array B ix e -> Int -> e #

Index ix => Mutable B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

data MArray s B ix e :: Type #

Methods

msize :: MArray s B ix e -> Sz ix #

unsafeThaw :: PrimMonad m => Array B ix e -> m (MArray (PrimState m) B ix e) #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) B ix e -> m (Array B ix e) #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) B ix e) #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) B ix e -> Int -> m e #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) B ix e -> Int -> e -> m () #

initialize :: PrimMonad m => MArray (PrimState m) B ix e -> m () #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) B ix e) #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) B ix e -> Ix1 -> Sz1 -> e -> m () #

unsafeLinearCopy :: (Mutable B ix' e, PrimMonad m) => MArray (PrimState m) B ix' e -> Ix1 -> MArray (PrimState m) B ix e -> Ix1 -> Sz1 -> m () #

unsafeArrayLinearCopy :: (Mutable B ix' e, PrimMonad m) => Array B ix' e -> Ix1 -> MArray (PrimState m) B ix e -> Ix1 -> Sz1 -> m () #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) B ix e -> Sz ix -> m (MArray (PrimState m) B ix e) #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) B ix e -> Sz ix -> m (MArray (PrimState m) B ix e) #

ColorSpace cs e => Readable (Sequence PBM) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

ColorSpace cs e => Readable (Sequence PGM) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

ColorSpace cs e => Readable (Sequence PPM) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (GifDelay, Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PBM)) (Array B Ix1 (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PGM)) (Array B Ix1 (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PPM)) (Array B Ix1 (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto GIF)) (Array B Ix1 (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable (Sequence GIF) (Array B Ix1 (GifDelay, Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Index ix => Functor (Array B ix) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

fmap :: (a -> b) -> Array B ix a -> Array B ix b #

(<$) :: a -> Array B ix b -> Array B ix a #

Index ix => Foldable (Array B ix)

Row-major sequential folding over a Boxed array.

Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

fold :: Monoid m => Array B ix m -> m #

foldMap :: Monoid m => (a -> m) -> Array B ix a -> m #

foldr :: (a -> b -> b) -> b -> Array B ix a -> b #

foldr' :: (a -> b -> b) -> b -> Array B ix a -> b #

foldl :: (b -> a -> b) -> b -> Array B ix a -> b #

foldl' :: (b -> a -> b) -> b -> Array B ix a -> b #

foldr1 :: (a -> a -> a) -> Array B ix a -> a #

foldl1 :: (a -> a -> a) -> Array B ix a -> a #

toList :: Array B ix a -> [a] #

null :: Array B ix a -> Bool #

length :: Array B ix a -> Int #

elem :: Eq a => a -> Array B ix a -> Bool #

maximum :: Ord a => Array B ix a -> a #

minimum :: Ord a => Array B ix a -> a #

sum :: Num a => Array B ix a -> a #

product :: Num a => Array B ix a -> a #

Index ix => Traversable (Array B ix) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

traverse :: Applicative f => (a -> f b) -> Array B ix a -> f (Array B ix b) #

sequenceA :: Applicative f => Array B ix (f a) -> f (Array B ix a) #

mapM :: Monad m => (a -> m b) -> Array B ix a -> m (Array B ix b) #

sequence :: Monad m => Array B ix (m a) -> m (Array B ix a) #

(IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array B ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

type Item (Array B ix e) :: Type #

Methods

fromList :: [Item (Array B ix e)] -> Array B ix e #

fromListN :: Int -> [Item (Array B ix e)] -> Array B ix e #

toList :: Array B ix e -> [Item (Array B ix e)] #

(Index ix, Eq e) => Eq (Array B ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

(==) :: Array B ix e -> Array B ix e -> Bool #

(/=) :: Array B ix e -> Array B ix e -> Bool #

(Index ix, Ord e) => Ord (Array B ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

compare :: Array B ix e -> Array B ix e -> Ordering #

(<) :: Array B ix e -> Array B ix e -> Bool #

(<=) :: Array B ix e -> Array B ix e -> Bool #

(>) :: Array B ix e -> Array B ix e -> Bool #

(>=) :: Array B ix e -> Array B ix e -> Bool #

max :: Array B ix e -> Array B ix e -> Array B ix e #

min :: Array B ix e -> Array B ix e -> Array B ix e #

(Ragged L ix e, Show e) => Show (Array B ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

showsPrec :: Int -> Array B ix e -> ShowS #

show :: Array B ix e -> String #

showList :: [Array B ix e] -> ShowS #

(Index ix, NFData e) => NFData (Array B ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

rnf :: Array B ix e -> () #

Eq a => Eq (Raster B p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster B p r c a -> Raster B p r c a -> Bool #

(/=) :: Raster B p r c a -> Raster B p r c a -> Bool #

data Array B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

data Array B ix e = BArray {}
type R B 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

type R B = M
data MArray s B ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

data MArray s B ix e = MBArray !(Sz ix) !(MutableArray s e)
type Item (Array B ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

type Item (Array B ix e) = Item (Array L ix e)

data N #

Array representation for Boxed elements. This structure is element and spine strict, and elements are always in Normal Form (NF), therefore NFData instance is required.

Constructors

N 
Instances
Show N 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

showsPrec :: Int -> N -> ShowS #

show :: N -> String #

showList :: [N] -> ShowS #

Index ix => Resize N ix 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeResize :: Index ix' => Sz ix' -> Array N ix e -> Array N ix' e #

Index ix => Stream N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

toStream :: Array N ix e -> Steps Id e #

(Index ix, NFData e) => Construct N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

setComp :: Comp -> Array N ix e -> Array N ix e #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array N ix e #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array N ix e #

(Index ix, NFData e) => Extract N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeExtract :: ix -> Sz ix -> Array N ix e -> Array (R N) ix e #

(Index ix, NFData e) => Source N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeIndex :: Array N ix e -> ix -> e #

unsafeLinearIndex :: Array N ix e -> Int -> e #

(Index ix, NFData e) => Load N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

type R N :: Type #

Methods

getComp :: Array N ix e -> Comp #

size :: Array N ix e -> Sz ix #

loadArrayM :: Monad m => Scheduler m () -> Array N ix e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array N ix e -> Maybe e #

maxSize :: Array N ix e -> Maybe (Sz ix)

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array N ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array N ix e -> m (MArray RealWorld r' ix e)

(Index ix, NFData e) => StrideLoad N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array N ix e -> (Int -> e -> m ()) -> m () #

(NFData e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt N ix e ~ Array M (Lower ix) e) => OuterSlice N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeOuterSlice :: Array N ix e -> Int -> Elt N ix e #

(NFData e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt N ix e ~ Array M (Lower ix) e) => InnerSlice N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeInnerSlice :: Array N ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt N ix e #

NFData e => Slice N Ix1 e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeSlice :: MonadThrow m => Array N Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt N Ix1 e) #

(Index ix, NFData e) => Manifest N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeLinearIndexM :: Array N ix e -> Int -> e #

(Index ix, NFData e) => Mutable N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

data MArray s N ix e :: Type #

Methods

msize :: MArray s N ix e -> Sz ix #

unsafeThaw :: PrimMonad m => Array N ix e -> m (MArray (PrimState m) N ix e) #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) N ix e -> m (Array N ix e) #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) N ix e) #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) N ix e -> Int -> m e #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) N ix e -> Int -> e -> m () #

initialize :: PrimMonad m => MArray (PrimState m) N ix e -> m () #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) N ix e) #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) N ix e -> Ix1 -> Sz1 -> e -> m () #

unsafeLinearCopy :: (Mutable N ix' e, PrimMonad m) => MArray (PrimState m) N ix' e -> Ix1 -> MArray (PrimState m) N ix e -> Ix1 -> Sz1 -> m () #

unsafeArrayLinearCopy :: (Mutable N ix' e, PrimMonad m) => Array N ix' e -> Ix1 -> MArray (PrimState m) N ix e -> Ix1 -> Sz1 -> m () #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) N ix e -> Sz ix -> m (MArray (PrimState m) N ix e) #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) N ix e -> Sz ix -> m (MArray (PrimState m) N ix e) #

(NFData e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array N ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

type Item (Array N ix e) :: Type #

Methods

fromList :: [Item (Array N ix e)] -> Array N ix e #

fromListN :: Int -> [Item (Array N ix e)] -> Array N ix e #

toList :: Array N ix e -> [Item (Array N ix e)] #

(Index ix, NFData e, Eq e) => Eq (Array N ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

(==) :: Array N ix e -> Array N ix e -> Bool #

(/=) :: Array N ix e -> Array N ix e -> Bool #

(Index ix, NFData e, Ord e) => Ord (Array N ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

compare :: Array N ix e -> Array N ix e -> Ordering #

(<) :: Array N ix e -> Array N ix e -> Bool #

(<=) :: Array N ix e -> Array N ix e -> Bool #

(>) :: Array N ix e -> Array N ix e -> Bool #

(>=) :: Array N ix e -> Array N ix e -> Bool #

max :: Array N ix e -> Array N ix e -> Array N ix e #

min :: Array N ix e -> Array N ix e -> Array N ix e #

(Ragged L ix e, Show e, NFData e) => Show (Array N ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

showsPrec :: Int -> Array N ix e -> ShowS #

show :: Array N ix e -> String #

showList :: [Array N ix e] -> ShowS #

(Index ix, NFData e) => NFData (Array N ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

rnf :: Array N ix e -> () #

(Eq a, NFData a) => Eq (Raster N p r c a) Source # 
Instance details

Defined in Geography.MapAlgebra

Methods

(==) :: Raster N p r c a -> Raster N p r c a -> Bool #

(/=) :: Raster N p r c a -> Raster N p r c a -> Bool #

newtype Array N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

newtype Array N ix e = NArray {}
type R N 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

type R N = M
newtype MArray s N ix e 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

newtype MArray s N ix e = MNArray {}
type Item (Array N ix e) 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

type Item (Array N ix e) = Item (Array L ix e)

data Ix2 #

2-dimensional index. This is also a base index for higher dimensions.

Since: massiv-0.1.0

Constructors

!Int :. !Int infixr 5 

Bundled Patterns

pattern Ix2 :: Int -> Int -> Ix2

2-dimensional index constructor. Useful when infix notation is inconvenient. (Ix2 i j) == (i :. j)

Since: massiv-0.1.0

Instances
Bounded Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

Methods

minBound :: Ix2 #

maxBound :: Ix2 #

Eq Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

Methods

(==) :: Ix2 -> Ix2 -> Bool #

(/=) :: Ix2 -> Ix2 -> Bool #

Num Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

Methods

(+) :: Ix2 -> Ix2 -> Ix2 #

(-) :: Ix2 -> Ix2 -> Ix2 #

(*) :: Ix2 -> Ix2 -> Ix2 #

negate :: Ix2 -> Ix2 #

abs :: Ix2 -> Ix2 #

signum :: Ix2 -> Ix2 #

fromInteger :: Integer -> Ix2 #

Ord Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

Methods

compare :: Ix2 -> Ix2 -> Ordering #

(<) :: Ix2 -> Ix2 -> Bool #

(<=) :: Ix2 -> Ix2 -> Bool #

(>) :: Ix2 -> Ix2 -> Bool #

(>=) :: Ix2 -> Ix2 -> Bool #

max :: Ix2 -> Ix2 -> Ix2 #

min :: Ix2 -> Ix2 -> Ix2 #

Show Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

Methods

showsPrec :: Int -> Ix2 -> ShowS #

show :: Ix2 -> String #

showList :: [Ix2] -> ShowS #

NFData Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

Methods

rnf :: Ix2 -> () #

Index Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

Associated Types

type Dimensions Ix2 :: Nat #

Methods

dimensions :: proxy Ix2 -> Dim #

totalElem :: Sz Ix2 -> Int #

consDim :: Int -> Lower Ix2 -> Ix2 #

unconsDim :: Ix2 -> (Int, Lower Ix2) #

snocDim :: Lower Ix2 -> Int -> Ix2 #

unsnocDim :: Ix2 -> (Lower Ix2, Int) #

pullOutDimM :: MonadThrow m => Ix2 -> Dim -> m (Int, Lower Ix2) #

insertDimM :: MonadThrow m => Lower Ix2 -> Dim -> Int -> m Ix2 #

getDimM :: MonadThrow m => Ix2 -> Dim -> m Int #

setDimM :: MonadThrow m => Ix2 -> Dim -> Int -> m Ix2 #

modifyDimM :: MonadThrow m => Ix2 -> Dim -> (Int -> Int) -> m (Int, Ix2) #

pureIndex :: Int -> Ix2 #

liftIndex2 :: (Int -> Int -> Int) -> Ix2 -> Ix2 -> Ix2 #

liftIndex :: (Int -> Int) -> Ix2 -> Ix2 #

foldlIndex :: (a -> Int -> a) -> a -> Ix2 -> a #

isSafeIndex :: Sz Ix2 -> Ix2 -> Bool #

toLinearIndex :: Sz Ix2 -> Ix2 -> Int #

toLinearIndexAcc :: Int -> Ix2 -> Ix2 -> Int #

fromLinearIndex :: Sz Ix2 -> Int -> Ix2 #

fromLinearIndexAcc :: Ix2 -> Int -> (Int, Ix2) #

repairIndex :: Sz Ix2 -> Ix2 -> (Sz Int -> Int -> Int) -> (Sz Int -> Int -> Int) -> Ix2 #

iterM :: Monad m => Ix2 -> Ix2 -> Ix2 -> (Int -> Int -> Bool) -> a -> (Ix2 -> a -> m a) -> m a #

iterM_ :: Monad m => Ix2 -> Ix2 -> Ix2 -> (Int -> Int -> Bool) -> (Ix2 -> m a) -> m () #

Unbox Ix2

Unboxing of a Ix2.

Instance details

Defined in Data.Massiv.Core.Index.Ix

Vector Vector Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

MVector MVector Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

Load DW Ix2 e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type #

Methods

getComp :: Array DW Ix2 e -> Comp #

size :: Array DW Ix2 e -> Sz Ix2 #

loadArrayM :: Monad m => Scheduler m () -> Array DW Ix2 e -> (Int -> e -> m ()) -> m () #

defaultElement :: Array DW Ix2 e -> Maybe e #

maxSize :: Array DW Ix2 e -> Maybe (Sz Ix2)

unsafeLoadIntoS :: (Mutable r' Ix2 e, PrimMonad m) => MArray (PrimState m) r' Ix2 e -> Array DW Ix2 e -> m (MArray (PrimState m) r' Ix2 e)

unsafeLoadInto :: (Mutable r' Ix2 e, MonadIO m) => MArray RealWorld r' Ix2 e -> Array DW Ix2 e -> m (MArray RealWorld r' Ix2 e)

StrideLoad DW Ix2 e 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix2 -> Sz Ix2 -> Array DW Ix2 e -> (Int -> e -> m ()) -> m () #

ColorSpace cs e => Readable PBM (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

decode :: PBM -> ReadOptions PBM -> ByteString -> Image S cs e #

ColorSpace cs e => Readable PGM (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

decode :: PGM -> ReadOptions PGM -> ByteString -> Image S cs e #

ColorSpace cs e => Readable PPM (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

decode :: PPM -> ReadOptions PPM -> ByteString -> Image S cs e #

ColorSpace cs e => Readable BMP (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: BMP -> ReadOptions BMP -> ByteString -> Image S cs e #

ColorSpace cs e => Readable PNG (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: PNG -> ReadOptions PNG -> ByteString -> Image S cs e #

ColorSpace cs e => Readable GIF (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: GIF -> ReadOptions GIF -> ByteString -> Image S cs e #

ColorSpace cs e => Readable HDR (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: HDR -> ReadOptions HDR -> ByteString -> Image S cs e #

ColorSpace cs e => Readable JPG (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: JPG -> ReadOptions JPG -> ByteString -> Image S cs e #

ColorSpace cs e => Readable TGA (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: TGA -> ReadOptions TGA -> ByteString -> Image S cs e #

ColorSpace cs e => Readable TIF (Image S cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: TIF -> ReadOptions TIF -> ByteString -> Image S cs e #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable BMP (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: BMP -> WriteOptions BMP -> Image r cs e -> ByteString #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable PNG (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: PNG -> WriteOptions PNG -> Image r cs e -> ByteString #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable GIF (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: GIF -> WriteOptions GIF -> Image r cs e -> ByteString #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable HDR (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: HDR -> WriteOptions HDR -> Image r cs e -> ByteString #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable JPG (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: JPG -> WriteOptions JPG -> Image r cs e -> ByteString #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable TGA (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: TGA -> WriteOptions TGA -> Image r cs e -> ByteString #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable TIF (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: TIF -> WriteOptions TIF -> Image r cs e -> ByteString #

FileFormat (Encode (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image

Associated Types

type ReadOptions (Encode (Image r cs e)) :: Type #

type WriteOptions (Encode (Image r cs e)) :: Type #

Methods

ext :: Encode (Image r cs e) -> String #

exts :: Encode (Image r cs e) -> [String] #

isFormat :: String -> Encode (Image r cs e) -> Bool #

FileFormat (Decode (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image

Associated Types

type ReadOptions (Decode (Image r cs e)) :: Type #

type WriteOptions (Decode (Image r cs e)) :: Type #

Methods

ext :: Decode (Image r cs e) -> String #

exts :: Decode (Image r cs e) -> [String] #

isFormat :: String -> Decode (Image r cs e) -> Bool #

Readable (Decode (Image r cs e)) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image

Methods

decode :: Decode (Image r cs e) -> ReadOptions (Decode (Image r cs e)) -> ByteString -> Image r cs e #

ColorSpace cs e => Readable (Sequence PBM) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

ColorSpace cs e => Readable (Sequence PGM) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

ColorSpace cs e => Readable (Sequence PPM) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (GifDelay, Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (Image S cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PBM)) (Array B Ix1 (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PGM)) (Array B Ix1 (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PPM)) (Array B Ix1 (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto GIF)) (Array B Ix1 (Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PBM) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

decode :: Auto PBM -> ReadOptions (Auto PBM) -> ByteString -> Image r cs e #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PGM) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

decode :: Auto PGM -> ReadOptions (Auto PGM) -> ByteString -> Image r cs e #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PPM) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

decode :: Auto PPM -> ReadOptions (Auto PPM) -> ByteString -> Image r cs e #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto BMP) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: Auto BMP -> ReadOptions (Auto BMP) -> ByteString -> Image r cs e #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PNG) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: Auto PNG -> ReadOptions (Auto PNG) -> ByteString -> Image r cs e #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto GIF) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: Auto GIF -> ReadOptions (Auto GIF) -> ByteString -> Image r cs e #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto HDR) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: Auto HDR -> ReadOptions (Auto HDR) -> ByteString -> Image r cs e #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto JPG) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: Auto JPG -> ReadOptions (Auto JPG) -> ByteString -> Image r cs e #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto TGA) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: Auto TGA -> ReadOptions (Auto TGA) -> ByteString -> Image r cs e #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto TIF) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

decode :: Auto TIF -> ReadOptions (Auto TIF) -> ByteString -> Image r cs e #

Writable (Encode (Image r cs e)) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image

Methods

encode :: Encode (Image r cs e) -> WriteOptions (Encode (Image r cs e)) -> Image r cs e -> ByteString #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable (Sequence GIF) (Array B Ix1 (GifDelay, Image r cs e)) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto BMP) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: Auto BMP -> WriteOptions (Auto BMP) -> Image r cs e -> ByteString #

(ColorSpace cs e, ToYA cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto PNG) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: Auto PNG -> WriteOptions (Auto PNG) -> Image r cs e -> ByteString #

(ColorSpace cs e, ToY cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto GIF) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: Auto GIF -> WriteOptions (Auto GIF) -> Image r cs e -> ByteString #

(ColorSpace cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto HDR) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: Auto HDR -> WriteOptions (Auto HDR) -> Image r cs e -> ByteString #

(ColorSpace cs e, ToYCbCr cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto JPG) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: Auto JPG -> WriteOptions (Auto JPG) -> Image r cs e -> ByteString #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TGA) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: Auto TGA -> WriteOptions (Auto TGA) -> Image r cs e -> ByteString #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TIF) (Image r cs e) 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels

Methods

encode :: Auto TIF -> WriteOptions (Auto TIF) -> Image r cs e -> ByteString #

newtype Vector Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

newtype Vector Ix2 = V_Ix2 (Vector (Int, Int))
type Lower Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

type Lower Ix2 = Ix1
type Dimensions Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

type Dimensions Ix2 = 2
newtype MVector s Ix2 
Instance details

Defined in Data.Massiv.Core.Index.Ix

newtype MVector s Ix2 = MV_Ix2 (MVector s (Int, Int))
type WriteOptions (Encode (Image r cs e)) 
<