Array +Data

data Array
text Data.Text.Array
Immutable array type.
data Array i e :: * -> * -> *
array Data.Array, array Data.Array.IArray
The type of immutable non-strict (boxed) arrays with indices in i and elements in e.
module Data.Array
array Data.Array
Basic non-strict arrays. Note: The Data.Array.IArray module provides a more general interface to immutable arrays: it defines operations with the same names as those defined below, but with more general types, and also defines Array instances of the relevant classes. To use that more general interface, import Data.Array.IArray but not Data.Array.
module Data.Text.Array
text Data.Text.Array
Packed, unboxed, heap-resident arrays. Suitable for performance critical use, both in terms of large data quantities and high speed. This module is intended to be imported qualified, to avoid name clashes with Prelude functions, e.g. > import qualified Data.Text.Array as A The names in this module resemble those in the Array family of modules, but are shorter due to the assumption of qualifid naming.
package ArrayRef
package
This array library supports: unboxed references, Monad-independent references, syntax sugar for mutable types, a reimplemented Arrays library, changes in MArray usage, and using dynamic (resizable) arrays Version 0.1.3.1
array :: (IArray a e, Ix i) => (i, i) -> [(i, e)] -> a i e
array Data.Array.IArray
Constructs an immutable array from a pair of bounds and a list of initial associations. The bounds are specified as a pair of the lowest and highest bounds in the array respectively. For example, a one-origin vector of length 10 has bounds (1,10), and a one-origin 10 by 10 matrix has bounds ((1,1),(10,10)). An association is a pair of the form (i,x), which defines the value of the array at index i to be x. The array is undefined if any index in the list is out of bounds. If any two associations in the list have the same index, the value at that index is implementation-dependent. (In GHC, the last value specified for that index is used. Other implementations will also do this for unboxed arrays, but Haskell 98 requires that for Array the value at such indices is bottom.) Because the indices must be checked for these errors, array is strict in the bounds argument and in the indices of the association list. Whether array is strict or non-strict in the elements depends on the array type: Array is a non-strict array type, but all of the UArray arrays are strict. Thus in a non-strict array, recurrences such as the following are possible: > a = array (1,100) ((1,1) (:) [(i, i * a!(i-1)) | i \<- [2..100]]) Not every index within the bounds of the array need appear in the association list, but the values associated with indices that do not appear will be undefined. If, in any dimension, the lower bound is greater than the upper bound, then the array is legal, but empty. Indexing an empty array always gives an array-bounds error, but bounds still yields the bounds with which the array was constructed.
array :: Ix i => (i, i) -> [(i, e)] -> Array i e
array Data.Array
Construct an array with the specified bounds and containing values for given indices within these bounds. The array is undefined (i.e. bottom) if any index in the list is out of bounds. The Haskell 98 Report further specifies that if any two associations in the list have the same index, the value at that index is undefined (i.e. bottom). However in GHC's implementation, the value at such an index is the value part of the last association with that index in the list. Because the indices must be checked for these errors, array is strict in the bounds argument and in the indices of the association list, but non-strict in the values. Thus, recurrences such as the following are possible: > a = array (1,100) ((1,1) (:) [(i, i * a!(i-1)) | i <- [2..100]]) Not every index within the bounds of the array need appear in the association list, but the values associated with indices that do not appear will be undefined (i.e. bottom). If, in any dimension, the lower bound is greater than the upper bound, then the array is legal, but empty. Indexing an empty array always gives an array-bounds error, but bounds still yields the bounds with which the array was constructed.
package array
package
In addition to providing the Data.Array module <http:www.haskell.orgonlinereporthaskell2010/haskellch14.html as specified in the Haskell 2010 Language Report>, this package also defines the classes IArray of immutable arrays and MArray of arrays mutable within appropriate monads, as well as some instances of these classes. Version 0.5.0.0
package array-forth
package
This is a package for working with arrayForth. This is a variant of Forth used by GreenArrays chips. This package contains an arrayForth simulator, two different representations of arrayForth programs and some utilities like parsing. It also supports synthesizing arrayForth programs using MCMC. The basic idea is to find arrayForth programs by taking a simple prior distribution of programs and using a randomized hill-climbing algorithm to find a program fulfilling certain tests. Version 0.2.0.6
package array-utils
package
An collection of functions for working with multiple elements in mutable arrays. It is hoped some or all of these functions will be included in the array package for GHC 7.2. New in this version: Basically all names have been changed. A lot of redundant information has been removed as well. Version 0.3
package AC-VanillaArray
package
This package is a thin layer over GHC's low-level array primitives. It provides arrays with zero-origin integers for indicies. (These arrays also lack bounds checks.) They come in two flavours: mutable or immutable. (Both are boxed and lazy, however. There are no unboxed arrays here.) The idea is that you can use this package as a starting point for building a more useful array package, without having to learn all GHC's low-level internals for yourself. Changes: * Now builds with GHC 6.12.1 Version 1.1.2
accumArray :: (IArray a e, Ix i) => (e -> e' -> e) -> e -> (i, i) -> [(i, e')] -> a i e
array Data.Array.IArray
Constructs an immutable array from a list of associations. Unlike array, the same index is allowed to occur multiple times in the list of associations; an accumulating function is used to combine the values of elements with the same index. For example, given a list of values of some index type, hist produces a histogram of the number of occurrences of each index within a specified range: > hist :: (Ix a, Num b) => (a,a) -> [a] -> Array a b > hist bnds is = accumArray (+) 0 bnds [(i, 1) | i\<-is, inRange bnds i]
accumArray :: Ix i => (e -> a -> e) -> e -> (i, i) -> [(i, a)] -> Array i e
array Data.Array
The accumArray function deals with repeated indices in the association list using an accumulating function which combines the values of associations with the same index. For example, given a list of values of some index type, hist produces a histogram of the number of occurrences of each index within a specified range: > hist :: (Ix a, Num b) => (a,a) -> [a] -> Array a b > hist bnds is = accumArray (+) 0 bnds [(i, 1) | i<-is, inRange bnds i] If the accumulating function is strict, then accumArray is strict in the values, as well as the indices, in the association list. Thus, unlike ordinary arrays built with array, accumulated arrays should not in general be recursive.
package bitarray
package
Mutable and immutable bit arrays. Version 0.0.1
package carray
package
A C-compatible array library. Provides both an immutable and mutable (in the IO monad) interface. Includes utilities for multi-dimensional arrays, slicing and norms. Memory is 16-byte aligned by default to enable use of SIMD instructions. Version 0.1.5.2
castIOUArray :: IOUArray i a -> IO (IOUArray i b)
array Data.Array.IO
Casts an IOUArray with one element type into one with a different element type. All the elements of the resulting array are undefined (unless you know what you're doing...).
castIOUArray :: IOUArray ix a -> IO (IOUArray ix b)
array Data.Array.Unsafe
Casts an IOUArray with one element type into one with a different element type. All the elements of the resulting array are undefined (unless you know what you're doing...).
castSTUArray :: STUArray s ix a -> ST s (STUArray s ix b)
array Data.Array.Unsafe, array Data.Array.ST
Casts an STUArray with one element type into one with a different element type. All the elements of the resulting array are undefined (unless you know what you're doing...).
module Data.Array.IArray
array Data.Array.IArray
Immutable arrays, with an overloaded interface. For array types which can be used with this interface, see the Array type exported by this module and the Data.Array.Unboxed module. Other packages, such as diffarray, also provide arrays using this interface.
module Data.Array.MArray
array Data.Array.MArray
An overloaded interface to mutable arrays. For array types which can be used with this interface, see Data.Array.IO, Data.Array.ST, and Data.Array.Storable.

Show more results