hTensor-0.9.1: Multidimensional arrays and simple tensor computations.

Copyright(c) Alberto Ruiz 2009
LicenseBSD3
MaintainerAlberto Ruiz
Stabilityprovisional
Safe HaskellNone
LanguageHaskell98

Numeric.LinearAlgebra.Array

Contents

Description

Simple multidimensional array with useful numeric instances.

Contractions only require equal dimension.

Synopsis

Documentation

data None Source #

Unespecified coordinate type. Contractions only require equal dimension.

Constructors

None 

Instances

Eq None Source # 

Methods

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

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

Show None Source # 

Methods

showsPrec :: Int -> None -> ShowS #

show :: None -> String #

showList :: [None] -> ShowS #

Compat None Source # 
Show (Idx None) Source # 

Methods

showsPrec :: Int -> Idx None -> ShowS #

show :: Idx None -> String #

showList :: [Idx None] -> ShowS #

Coord t => Show (Array t) Source # 

Methods

showsPrec :: Int -> Array t -> ShowS #

show :: Array t -> String #

showList :: [Array t] -> ShowS #

type Array t = NArray None t Source #

Multidimensional array with unespecified coordinate type.

listArray Source #

Arguments

:: Coord t 
=> [Int]

dimensions

-> [t]

elements

-> 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 t Source #

Create a 0-dimensional structure.

index :: Coord t => Name -> [Array t] -> Array t Source #

Create an Array from a list of parts (index = newIndex None).

(!) :: (Compat i, Coord t) => NArray i t -> [Char] -> NArray i t infixl 9 Source #

Rename indices in alphabetical order (renameO) using single letter names.

(!>) :: (Compat i, Coord t) => NArray i t -> [Char] -> NArray i t infixl 9 Source #

Explicit renaming of single letter index names.

For instance, t >@> "pi qj" changes index "p" to "i" and "q" to "j".

(~>) :: Coord t => NArray i t -> String -> NArray i t infixl 8 Source #

reorder (transpose) 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 a infixl 7 Source #

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).

Orphan instances

(Eq t, Coord t, Compat i) => Eq (NArray i t) Source # 

Methods

(==) :: NArray i t -> NArray i t -> Bool #

(/=) :: NArray i t -> NArray i t -> Bool #

(Coord t, Compat i, Fractional (NArray i t), Floating t, Floating (Vector t)) => Floating (NArray i t) Source # 

Methods

pi :: NArray i t #

exp :: NArray i t -> NArray i t #

log :: NArray i t -> NArray i t #

sqrt :: NArray i t -> NArray i t #

(**) :: NArray i t -> NArray i t -> NArray i t #

logBase :: NArray i t -> NArray i t -> NArray i t #

sin :: NArray i t -> NArray i t #

cos :: NArray i t -> NArray i t #

tan :: NArray i t -> NArray i t #

asin :: NArray i t -> NArray i t #

acos :: NArray i t -> NArray i t #

atan :: NArray i t -> NArray i t #

sinh :: NArray i t -> NArray i t #

cosh :: NArray i t -> NArray i t #

tanh :: NArray i t -> NArray i t #

asinh :: NArray i t -> NArray i t #

acosh :: NArray i t -> NArray i t #

atanh :: NArray i t -> NArray i t #

log1p :: NArray i t -> NArray i t #

expm1 :: NArray i t -> NArray i t #

log1pexp :: NArray i t -> NArray i t #

log1mexp :: NArray i t -> NArray i t #

(Fractional t, Coord t, Compat i, Num (NArray i t)) => Fractional (NArray i t) Source # 

Methods

(/) :: NArray i t -> NArray i t -> NArray i t #

recip :: NArray i t -> NArray i t #

fromRational :: Rational -> NArray i t #

(Show (NArray i t), Coord t, Compat i) => Num (NArray i t) Source # 

Methods

(+) :: NArray i t -> NArray i t -> NArray i t #

(-) :: NArray i t -> NArray i t -> NArray i t #

(*) :: NArray i t -> NArray i t -> NArray i t #

negate :: NArray i t -> NArray i t #

abs :: NArray i t -> NArray i t #

signum :: NArray i t -> NArray i t #

fromInteger :: Integer -> NArray i t #