lapack-0.2.1: Numerical Linear Algebra using LAPACK

Safe HaskellNone

Numeric.LAPACK.Vector

Synopsis

Documentation

type family RealOf x Source

toList :: (C sh, Storable a) => Vector sh a -> [a]Source

fromList :: (C sh, Storable a) => sh -> [a] -> Vector sh aSource

append :: (C shx, C shy, Storable a) => Vector shx a -> Vector shy a -> Vector (shx :+: shy) aSource

takeLeft :: (C sh0, C sh1, Storable a) => Vector (sh0 :+: sh1) a -> Vector sh0 aSource

takeRight :: (C sh0, C sh1, Storable a) => Vector (sh0 :+: sh1) a -> Vector sh1 aSource

constant :: (C sh, Floating a) => sh -> a -> Vector sh aSource

unit :: (Indexed sh, Floating a) => sh -> Index sh -> Vector sh aSource

dot :: (C sh, Eq sh, Floating a) => Vector sh a -> Vector sh a -> aSource

 dot x y = Matrix.toScalar (singleRow x <#> singleColumn y)

inner :: (C sh, Eq sh, Floating a) => Vector sh a -> Vector sh a -> aSource

 inner x y = dot (conjugate x) y

sum :: (C sh, Floating a) => Vector sh a -> aSource

absSum :: (C sh, Floating a) => Vector sh a -> RealOf aSource

Sum of the absolute values of real numbers or components of complex numbers. For real numbers it is equivalent to norm1.

norm1 :: (C sh, Floating a) => Vector sh a -> RealOf aSource

norm2 :: (C sh, Floating a) => Vector sh a -> RealOf aSource

Euclidean norm of a vector or Frobenius norm of a matrix.

normInf :: (C sh, Floating a) => Vector sh a -> RealOf aSource

normInf1 :: (C sh, Floating a) => Vector sh a -> RealOf aSource

Computes (almost) the infinity norm of the vector. For complex numbers every element is replaced by the sum of the absolute component values first.

argAbsMaximum :: (InvIndexed sh, Floating a) => Vector sh a -> (Index sh, a)Source

Returns the index and value of the element with the maximal absolute value. Caution: It actually returns the value of the element, not its absolute value!

argAbs1Maximum :: (InvIndexed sh, Floating a) => Vector sh a -> (Index sh, a)Source

Returns the index and value of the element with the maximal absolute value. The function does not strictly compare the absolute value of a complex number but the sum of the absolute complex components. Caution: It actually returns the value of the element, not its absolute value!

product :: (C sh, Floating a) => Vector sh a -> aSource

scale :: (C sh, Floating a) => a -> Vector sh a -> Vector sh aSource

scaleReal :: (C sh, Floating a) => RealOf a -> Vector sh a -> Vector sh aSource

add :: (C sh, Eq sh, Floating a) => Vector sh a -> Vector sh a -> Vector sh aSource

sub :: (C sh, Eq sh, Floating a) => Vector sh a -> Vector sh a -> Vector sh aSource

mac :: (C sh, Eq sh, Floating a) => a -> Vector sh a -> Vector sh a -> Vector sh aSource

mul :: (C sh, Eq sh, Floating a) => Vector sh a -> Vector sh a -> Vector sh aSource

conjugate :: (C sh, Floating a) => Vector sh a -> Vector sh aSource

fromReal :: (C sh, Floating a) => Vector sh (RealOf a) -> Vector sh aSource

toComplex :: (C sh, Floating a) => Vector sh a -> Vector sh (ComplexOf a)Source

realPart :: (C sh, Floating a) => Vector sh a -> Vector sh (RealOf a)Source

complexFromReal :: (C sh, Real a) => Vector sh a -> Vector sh (Complex a)Source

complexToRealPart :: (C sh, Real a) => Vector sh (Complex a) -> Vector sh aSource

zipComplex :: (C sh, Eq sh, Real a) => Vector sh a -> Vector sh a -> Vector sh (Complex a)Source

unzipComplex :: (C sh, Real a) => Vector sh (Complex a) -> (Vector sh a, Vector sh a)Source

random :: (C sh, Floating a) => RandomDistribution -> sh -> Word64 -> Vector sh aSource