repa-array-4.2.3.1: Bulk array representations and operators.

Safe HaskellSafe
LanguageHaskell98

Data.Repa.Array.Meta.Linear

Synopsis

Documentation

data L Source #

A linear layout with the elements indexed by integers.

  • Indexing is not bounds checked. Indexing outside the extent yields the corresponding index.

Constructors

Linear 

Fields

Instances

Eq L Source # 

Methods

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

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

Show L Source # 

Methods

showsPrec :: Int -> L -> ShowS #

show :: L -> String #

showList :: [L] -> ShowS #

Layout L Source #

Linear layout.

Associated Types

data Name L :: * Source #

type Index L :: * Source #

Bulk L Int Source #

Linear arrays.

Associated Types

data Array L Int :: * Source #

Methods

layout :: Array L Int -> L Source #

index :: Array L Int -> Index L -> Int Source #

Eq (Name L) Source # 

Methods

(==) :: Name L -> Name L -> Bool #

(/=) :: Name L -> Name L -> Bool #

Show (Name L) Source # 

Methods

showsPrec :: Int -> Name L -> ShowS #

show :: Name L -> String #

showList :: [Name L] -> ShowS #

data Name L Source # 
data Name L = L
type Index L Source # 
type Index L = Int
data Array L Int Source # 

linear :: Int -> Array L Int Source #

Construct a linear array that produces the corresponding index for every element.

> toList $ linear 10
   [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]