hmatrix-0.5.1.1: Linear algebra and numerical computations

Portabilityportable
Stabilityprovisional
MaintainerAlberto Ruiz (aruiz at um dot es)

Numeric.LinearAlgebra.Interface

Description

(Very provisional) operators for frequent operations.

Synopsis

Documentation

(<>) :: (Mul a b c, Field t) => a t -> b t -> c tSource

matrix product

(<.>) :: Field t => Vector t -> Vector t -> tSource

u <.> v = dot u v

(<\>) :: Field a => Matrix a -> Vector a -> Vector aSource

least squares solution of a linear system, similar to the \ operator of Matlab/Octave (based on linearSolveSVD).

(.*) :: Linear c a => a -> c a -> c aSource

x .* a = scale x a

(*/) :: Linear c a => c a -> a -> c aSource

a */ x = scale (recip x) a

(<|>) :: (Element t, Joinable a b) => a t -> b t -> Matrix tSource

Horizontal concatenation of matrices and vectors:

> (ident 3 <-> 3 * ident 3) <|> fromList [1..6.0]
(6><4)
 [ 1.0, 0.0, 0.0, 1.0
 , 0.0, 1.0, 0.0, 2.0
 , 0.0, 0.0, 1.0, 3.0
 , 3.0, 0.0, 0.0, 4.0
 , 0.0, 3.0, 0.0, 5.0
 , 0.0, 0.0, 3.0, 6.0 ]

(<->) :: (Element t, Joinable a b) => a t -> b t -> Matrix tSource

Vertical concatenation of matrices and vectors.