hTensor-0.1.0: Multidimensional arrays and simple tensor computations.Source codeContentsIndex
Numeric.LinearAlgebra.Array
Portabilityportable
Stabilityprovisional
MaintainerAlberto Ruiz <aruiz@um.es>
Description

Simple multidimensional array with useful numeric instances.

Contractions only require equal dimension.

Synopsis
data None = None
type Array t = NArray None t
listArray :: Coord t => [Int] -> [t] -> Array t
scalar :: Coord t => t -> NArray i t
index :: Coord t => Name -> [Array t] -> Array t
(!) :: (Coord t, Compat i) => NArray i t -> String -> NArray i t
(~>) :: Coord t => NArray i t -> String -> NArray i t
(.*) :: (Coord a, Compat i) => NArray i a -> NArray i a -> NArray i a
printA :: (Coord t, Compat i, PrintfArg t) => String -> NArray i t -> IO ()
Documentation
data None Source
Unespecified coordinate type. Contractions only require equal dimension.
Constructors
None
show/hide Instances
type Array t = NArray None tSource
Multidimensional array with unespecified coordinate type.
listArraySource
:: Coord t
=> [Int]elements
-> [t]
-> Array t
Construction of an Array from a list of dimensions and a list of elements in left to right order.
scalar :: Coord t => t -> NArray i tSource
Create a 0-dimensional structure.
index :: Coord t => Name -> [Array t] -> Array tSource
Create an Array from a list of parts (index = newIndex None).
(!)Source
:: (Coord t, Compat i)
=> NArray i tnew indices
-> String
-> NArray i t
rename the indices with single-letter names. Equal indices of compatible type are contracted out.
(~>) :: Coord t => NArray i t -> String -> NArray i tSource

reorder (transpose) the dimensions of the array (with single letter names).

Operations are defined by named indices, so the transposed array is operationally equivalent to the original one.

(.*) :: (Coord a, Compat i) => NArray i a -> NArray i a -> NArray i aSource
Element by element product.
printA :: (Coord t, Compat i, PrintfArg t) => String -> NArray i t -> IO ()Source
Print the array as a nested table with the desired format (e.g. %7.2f) (see also formatArray, and formatScaled).
Produced by Haddock version 2.6.0