hmatrix-0.8.3.1: Linear algebra and numerical computationSource codeContentsIndex
Numeric.LinearAlgebra.Linear
Portabilityuses ffi
Stabilityprovisional
MaintainerAlberto Ruiz (aruiz at um dot es)
Description
Basic optimized operations on vectors and matrices.
Synopsis
class Container c e => Linear c e where
scalar :: e -> c e
scale :: e -> c e -> c e
scaleRecip :: e -> c e -> c e
addConstant :: e -> c e -> c e
add :: c e -> c e -> c e
sub :: c e -> c e -> c e
mul :: c e -> c e -> c e
divide :: c e -> c e -> c e
equal :: c e -> c e -> Bool
Documentation
class Container c e => Linear c e whereSource
A generic interface for vectors and matrices to a few element-by-element functions in Numeric.GSL.Vector.
Methods
scalar :: e -> c eSource
create a structure with a single element
scale :: e -> c e -> c eSource
scaleRecip :: e -> c e -> c eSource

scale the element by element reciprocal of the object:

scaleRecip 2 (fromList [5,i]) == 2 |> [0.4 :+ 0.0,0.0 :+ (-2.0)]
addConstant :: e -> c e -> c eSource
add :: c e -> c e -> c eSource
sub :: c e -> c e -> c eSource
mul :: c e -> c e -> c eSource
element by element multiplication
divide :: c e -> c e -> c eSource
element by element division
equal :: c e -> c e -> BoolSource
show/hide Instances
Produced by Haddock version 2.6.0