lapack-0.3.0.1: Numerical Linear Algebra using LAPACK

Safe HaskellNone
LanguageHaskell98

Numeric.LAPACK.Matrix

Synopsis

Documentation

data family Matrix typ a Source #

Instances
(C sh, Show sh) => Show (Matrix (Permutation sh) a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

Methods

showsPrec :: Int -> Matrix (Permutation sh) a -> ShowS #

show :: Matrix (Permutation sh) a -> String #

showList :: [Matrix (Permutation sh) a] -> ShowS #

(C shape, Storable a, Show shape, Show a) => Show (Matrix (Array shape) a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

Methods

showsPrec :: Int -> Matrix (Array shape) a -> ShowS #

show :: Matrix (Array shape) a -> String #

showList :: [Matrix (Array shape) a] -> ShowS #

(MultiplySame typ, Floating a) => Semigroup (Matrix typ a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

Methods

(<>) :: Matrix typ a -> Matrix typ a -> Matrix typ a #

sconcat :: NonEmpty (Matrix typ a) -> Matrix typ a #

stimes :: Integral b => b -> Matrix typ a -> Matrix typ a #

(NFData typ, NFData a) => NFData (Matrix typ a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

Methods

rnf :: Matrix typ a -> () #

(FormatMatrix typ, Floating a) => Display (Matrix typ a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

Methods

display :: Matrix typ a -> Graphic #

(FormatMatrix typ, Floating a) => Format (Matrix typ a) Source # 
Instance details

Defined in Numeric.LAPACK.Format

Methods

format :: Output out => String -> Matrix typ a -> out Source #

newtype Matrix (Permutation sh) a Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

newtype Matrix (Array shape) a Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

newtype Matrix (Array shape) a = Array (Array shape a)

type Full vert horiz height width = ArrayMatrix (Full vert horiz height width) Source #

type General height width = ArrayMatrix (General height width) Source #

type Tall height width = ArrayMatrix (Tall height width) Source #

type Wide height width = ArrayMatrix (Wide height width) Source #

type Triangular lo diag up sh = ArrayMatrix (Triangular lo diag up sh) Source #

transpose :: (C vert, C horiz) => Full vert horiz height width a -> Full horiz vert width height a Source #

adjoint :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> Full horiz vert width height a Source #

conjugate transpose

Problem: adjoint a <> a is always square, but how to convince the type checker to choose the Square type? Anser: Use Hermitian.toSquare $ Hermitian.gramian a instead.

height :: Box typ => Matrix typ a -> HeightOf typ Source #

width :: Box typ => Matrix typ a -> WidthOf typ Source #

type family HeightOf typ Source #

Instances
type HeightOf (Permutation sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

type HeightOf (Permutation sh) = sh
type HeightOf (Array sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

type HeightOf (Array sh) = HeightOf sh

type family WidthOf typ Source #

Instances
type WidthOf (Permutation sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

type WidthOf (Permutation sh) = sh
type WidthOf (Array sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

type WidthOf (Array sh) = WidthOf sh

class Box typ Source #

Minimal complete definition

height, width

Instances
Box (Permutation sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

Associated Types

type HeightOf (Permutation sh) :: Type Source #

type WidthOf (Permutation sh) :: Type Source #

Box sh => Box (Array sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

Associated Types

type HeightOf (Array sh) :: Type Source #

type WidthOf (Array sh) :: Type Source #

Methods

height :: Matrix (Array sh) a -> HeightOf (Array sh) Source #

width :: Matrix (Array sh) a -> WidthOf (Array sh) Source #

indices :: (Box typ, HeightOf typ ~ height, Indexed height, WidthOf typ ~ width, Indexed width) => Matrix typ a -> [(Index height, Index width)] Source #

reshape :: (C sh0, C sh1) => sh1 -> ArrayMatrix sh0 a -> ArrayMatrix sh1 a Source #

mapShape :: (C sh0, C sh1) => (sh0 -> sh1) -> ArrayMatrix sh0 a -> ArrayMatrix sh1 a Source #

caseTallWide :: (C vert, C horiz, C height, C width) => Full vert horiz height width a -> Either (Tall height width a) (Wide height width a) Source #

Square matrices will be classified as Tall.

fromScalar :: Storable a => a -> General () () a Source #

toScalar :: Storable a => General () () a -> a Source #

fromList :: (C height, C width, Storable a) => height -> width -> [a] -> General height width a Source #

mapExtent :: (C vertA, C horizA) => (C vertB, C horizB) => Map vertA horizA vertB horizB height width -> Full vertA horizA height width a -> Full vertB horizB height width a Source #

fromFull :: (C vert, C horiz) => Full vert horiz height width a -> General height width a Source #

asGeneral :: General height width a -> General height width a Source #

asTall :: Tall height width a -> Tall height width a Source #

asWide :: Wide height width a -> Wide height width a Source #

tallFromGeneral :: (C height, C width, Storable a) => General height width a -> Tall height width a Source #

wideFromGeneral :: (C height, C width, Storable a) => General height width a -> Wide height width a Source #

generalizeTall :: (C vert, C horiz) => Full vert Small height width a -> Full vert horiz height width a Source #

generalizeWide :: (C vert, C horiz) => Full Small horiz height width a -> Full vert horiz height width a Source #

mapHeight :: (C heightA, C heightB, GeneralTallWide vert horiz, GeneralTallWide horiz vert) => (heightA -> heightB) -> Full vert horiz heightA width a -> Full vert horiz heightB width a Source #

The number of rows must be maintained by the height mapping function.

mapWidth :: (C widthA, C widthB, GeneralTallWide vert horiz, GeneralTallWide horiz vert) => (widthA -> widthB) -> Full vert horiz height widthA a -> Full vert horiz height widthB a Source #

The number of columns must be maintained by the width mapping function.

identity :: (C sh, Floating a) => sh -> General sh sh a Source #

diagonal :: (C sh, Floating a) => Vector sh a -> General sh sh a Source #

fromRowsNonEmpty :: (C width, Eq width, Storable a) => T [] (Vector width a) -> General ShapeInt width a Source #

fromRowArray :: (C height, C width, Eq width, Storable a) => width -> Array height (Vector width a) -> General height width a Source #

fromRows :: (C width, Eq width, Storable a) => width -> [Vector width a] -> General ShapeInt width a Source #

fromRowsNonEmptyContainer :: (f ~ T g, C g, C width, Eq width, Storable a) => f (Vector width a) -> General (Shape f) width a Source #

fromRowContainer :: (C f, C width, Eq width, Storable a) => width -> f (Vector width a) -> General (Shape f) width a Source #

fromColumnsNonEmpty :: (C height, Eq height, Storable a) => T [] (Vector height a) -> General height ShapeInt a Source #

fromColumnArray :: (C height, Eq height, C width, Storable a) => height -> Array width (Vector height a) -> General height width a Source #

fromColumns :: (C height, Eq height, Storable a) => height -> [Vector height a] -> General height ShapeInt a Source #

fromColumnsNonEmptyContainer :: (f ~ T g, C g, C height, Eq height, Storable a) => f (Vector height a) -> General height (Shape f) a Source #

fromColumnContainer :: (C f, C height, Eq height, Storable a) => height -> f (Vector height a) -> General height (Shape f) a Source #

singleRow :: Order -> Vector width a -> General () width a Source #

singleColumn :: Order -> Vector height a -> General height () a Source #

flattenRow :: General () width a -> Vector width a Source #

flattenColumn :: General height () a -> Vector height a Source #

liftRow :: Order -> (Vector height0 a -> Vector height1 b) -> General () height0 a -> General () height1 b Source #

liftColumn :: Order -> (Vector height0 a -> Vector height1 b) -> General height0 () a -> General height1 () b Source #

unliftRow :: Order -> (General () height0 a -> General () height1 b) -> Vector height0 a -> Vector height1 b Source #

unliftColumn :: Order -> (General height0 () a -> General height1 () b) -> Vector height0 a -> Vector height1 b Source #

toRows :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> [Vector width a] Source #

toColumns :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> [Vector height a] Source #

toRowArray :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> Array height (Vector width a) Source #

toColumnArray :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> Array width (Vector height a) Source #

toRowContainer :: (C vert, C horiz, C f, C width, Floating a) => Full vert horiz (Shape f) width a -> f (Vector width a) Source #

toColumnContainer :: (C vert, C horiz, C height, C f, Floating a) => Full vert horiz height (Shape f) a -> f (Vector height a) Source #

takeRow :: (C vert, C horiz, Indexed height, C width, Index height ~ ix, Floating a) => Full vert horiz height width a -> ix -> Vector width a Source #

takeColumn :: (C vert, C horiz, C height, Indexed width, Index width ~ ix, Floating a) => Full vert horiz height width a -> ix -> Vector height a Source #

takeRows :: (C vert, C width, Floating a) => Int -> Full vert Big ShapeInt width a -> Full vert Big ShapeInt width a Source #

takeColumns :: (C horiz, C height, Floating a) => Int -> Full Big horiz height ShapeInt a -> Full Big horiz height ShapeInt a Source #

takeEqually :: (C vert, C horiz, Floating a) => Int -> Full vert horiz ShapeInt ShapeInt a -> Full vert horiz ShapeInt ShapeInt a Source #

Take a left-top aligned square or as much as possible of it. The advantange of this function is that it maintains the matrix size relation, e.g. Square remains Square, Tall remains Tall.

dropRows :: (C vert, C width, Floating a) => Int -> Full vert Big ShapeInt width a -> Full vert Big ShapeInt width a Source #

dropColumns :: (C horiz, C height, Floating a) => Int -> Full Big horiz height ShapeInt a -> Full Big horiz height ShapeInt a Source #

dropEqually :: (C vert, C horiz, Floating a) => Int -> Full vert horiz ShapeInt ShapeInt a -> Full vert horiz ShapeInt ShapeInt a Source #

Drop the same number of top-most rows and left-most columns. The advantange of this function is that it maintains the matrix size relation, e.g. Square remains Square, Tall remains Tall.

takeTop :: (C vert, C height0, C height1, C width, Floating a) => Full vert Big (height0 :+: height1) width a -> Full vert Big height0 width a Source #

takeBottom :: (C vert, C height0, C height1, C width, Floating a) => Full vert Big (height0 :+: height1) width a -> Full vert Big height1 width a Source #

takeLeft :: (C vert, C height, C width0, C width1, Floating a) => Full Big vert height (width0 :+: width1) a -> Full Big vert height width0 a Source #

takeRight :: (C vert, C height, C width0, C width1, Floating a) => Full Big vert height (width0 :+: width1) a -> Full Big vert height width1 a Source #

takeRowArray :: (Indexed height, C width, C sh, Floating a) => Array sh (Index height) -> General height width a -> General sh width a Source #

The function is optimized for blocks of consecutive rows. For scattered rows in column major order the function has quite ugly memory access patterns.

takeColumnArray :: (C height, Indexed width, C sh, Floating a) => Array sh (Index width) -> General height width a -> General height sh a Source #

swapRows :: (C vert, C horiz, Indexed height, C width, Floating a) => Index height -> Index height -> Full vert horiz height width a -> Full vert horiz height width a Source #

swapColumns :: (C vert, C horiz, C height, Indexed width, Floating a) => Index width -> Index width -> Full vert horiz height width a -> Full vert horiz height width a Source #

reverseRows :: (C vert, C horiz, C width, Floating a) => Full vert horiz ShapeInt width a -> Full vert horiz ShapeInt width a Source #

reverseColumns :: (C vert, C horiz, C height, Floating a) => Full vert horiz height ShapeInt a -> Full vert horiz height ShapeInt a Source #

fromRowMajor :: (C height, C width, Floating a) => Array (height, width) a -> General height width a Source #

toRowMajor :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> Array (height, width) a Source #

forceOrder :: (ShapeOrder shape, Floating a) => Order -> ArrayMatrix shape a -> ArrayMatrix shape a Source #

adaptOrder :: (ShapeOrder shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a Source #

adaptOrder x y contains the data of y with the layout of x.

leftBias :: OrderBias Source #

Use the element order of the first operand.

rightBias :: OrderBias Source #

Use the element order of the second operand.

contiguousBias :: OrderBias Source #

Choose element order such that, if possible, one part can be copied as one block. For above this means that RowMajor is chosen whenever at least one operand is RowMajor and ColumnMajor is chosen when both operands are ColumnMajor.

(|||) :: (C vertA, C vertB, C vertC, Append vertA vertB ~ vertC, C height, Eq height, C widthA, C widthB, Floating a) => Full vertA Big height widthA a -> Full vertB Big height widthB a -> Full vertC Big height (widthA :+: widthB) a infixr 3 Source #

beside :: (C vertA, C vertB, C vertC, C height, Eq height, C widthA, C widthB, Floating a) => OrderBias -> AppendMode vertA vertB vertC height widthA widthB -> Full vertA Big height widthA a -> Full vertB Big height widthB a -> Full vertC Big height (widthA :+: widthB) a Source #

(===) :: (C horizA, C horizB, C horizC, Append horizA horizB ~ horizC, C width, Eq width, C heightA, C heightB, Floating a) => Full Big horizA heightA width a -> Full Big horizB heightB width a -> Full Big horizC (heightA :+: heightB) width a infixr 2 Source #

above :: (C horizA, C horizB, C horizC, C width, Eq width, C heightA, C heightB, Floating a) => OrderBias -> AppendMode horizA horizB horizC width heightA heightB -> Full Big horizA heightA width a -> Full Big horizB heightB width a -> Full Big horizC (heightA :+: heightB) width a Source #

(|*-) :: (C height, Eq height, C width, Eq width, Floating a) => Vector height a -> Vector width a -> General height width a infixl 7 Source #

tensorProduct :: (C height, Eq height, C width, Eq width, Floating a) => Order -> Vector height a -> Vector width a -> General height width a Source #

tensorProduct order x y = singleColumn order x #*# singleRow order y

outer :: (C height, Eq height, C width, Eq width, Floating a) => Order -> Vector height a -> Vector width a -> General height width a Source #

outer order x y = tensorProduct order x (Vector.conjugate y)

kronecker :: (C vert, C horiz, C heightA, C widthA, C heightB, C widthB, Floating a) => Full vert horiz heightA widthA a -> Full vert horiz heightB widthB a -> Full vert horiz (heightA, heightB) (widthA, widthB) a Source #

sumRank1 :: (C height, Eq height, C width, Eq width, Floating a) => (height, width) -> [(a, (Vector height a, Vector width a))] -> General height width a Source #

map :: (C vert, C horiz, C height, C width, Storable a, Storable b) => (a -> b) -> Full vert horiz height width a -> Full vert horiz height width b Source #

class Complex typ Source #

Minimal complete definition

conjugate, fromReal, toComplex

Instances
C shape => Complex (Permutation shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Class

Methods

conjugate :: Floating a => Matrix (Permutation shape) a -> Matrix (Permutation shape) a Source #

fromReal :: Floating a => Matrix (Permutation shape) (RealOf a) -> Matrix (Permutation shape) a Source #

toComplex :: Floating a => Matrix (Permutation shape) a -> Matrix (Permutation shape) (ComplexOf a) Source #

Complex sh => Complex (Array sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Class

Methods

conjugate :: Floating a => Matrix (Array sh) a -> Matrix (Array sh) a Source #

fromReal :: Floating a => Matrix (Array sh) (RealOf a) -> Matrix (Array sh) a Source #

toComplex :: Floating a => Matrix (Array sh) a -> Matrix (Array sh) (ComplexOf a) Source #

conjugate :: (Complex typ, Floating a) => Matrix typ a -> Matrix typ a Source #

fromReal :: (Complex typ, Floating a) => Matrix typ (RealOf a) -> Matrix typ a Source #

toComplex :: (Complex typ, Floating a) => Matrix typ a -> Matrix typ (ComplexOf a) Source #

class SquareShape typ Source #

Minimal complete definition

toSquare, identityOrder, takeDiagonal

Instances
C sh => SquareShape (Permutation sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Class

Methods

toSquare :: (HeightOf (Permutation sh) ~ sh0, Floating a) => Matrix (Permutation sh) a -> Square sh0 a Source #

identityOrder :: (HeightOf (Permutation sh) ~ sh0, Floating a) => Order -> sh0 -> Matrix (Permutation sh) a

takeDiagonal :: (HeightOf (Permutation sh) ~ sh0, Floating a) => Matrix (Permutation sh) a -> Vector sh0 a Source #

SquareShape sh => SquareShape (Array sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Class

Methods

toSquare :: (HeightOf (Array sh) ~ sh0, Floating a) => Matrix (Array sh) a -> Square sh0 a Source #

identityOrder :: (HeightOf (Array sh) ~ sh0, Floating a) => Order -> sh0 -> Matrix (Array sh) a

takeDiagonal :: (HeightOf (Array sh) ~ sh0, Floating a) => Matrix (Array sh) a -> Vector sh0 a Source #

toSquare :: (SquareShape typ, HeightOf typ ~ sh, Floating a) => Matrix typ a -> Square sh a Source #

identityFrom :: (SquareShape shape, ShapeOrder shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a Source #

identityFromHeight :: (ShapeOrder shape, Box shape, HeightOf shape ~ HeightOf typ, SquareShape typ, Floating a) => ArrayMatrix shape a -> Matrix typ a Source #

identityFromWidth :: (ShapeOrder shape, Box shape, WidthOf shape ~ HeightOf typ, SquareShape typ, Floating a) => ArrayMatrix shape a -> Matrix typ a Source #

takeDiagonal :: (SquareShape typ, HeightOf typ ~ sh, Floating a) => Matrix typ a -> Vector sh a Source #

trace :: (SquareShape typ, HeightOf typ ~ sh, C sh, Floating a) => Matrix typ a -> a Source #

type family RealOf x Source #

Instances
type RealOf Double Source # 
Instance details

Defined in Numeric.LAPACK.Scalar

type RealOf Float Source # 
Instance details

Defined in Numeric.LAPACK.Scalar

type RealOf (Complex a) Source # 
Instance details

Defined in Numeric.LAPACK.Scalar

type RealOf (Complex a) = a

rowSums :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> Vector height a Source #

columnSums :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> Vector width a Source #

rowArgAbsMaximums :: (C vert, C horiz, C height, InvIndexed width, Index width ~ ix, Storable ix, Floating a) => Full vert horiz height width a -> (Vector height ix, Vector height a) Source #

columnArgAbsMaximums :: (C vert, C horiz, InvIndexed height, C width, Index height ~ ix, Storable ix, Floating a) => Full vert horiz height width a -> (Vector width ix, Vector width a) Source #

scaleRows :: (C vert, C horiz, C height, Eq height, C width, Floating a) => Vector height a -> Full vert horiz height width a -> Full vert horiz height width a Source #

scaleColumns :: (C vert, C horiz, C height, C width, Eq width, Floating a) => Vector width a -> Full vert horiz height width a -> Full vert horiz height width a Source #

scaleRowsReal :: (C vert, C horiz, C height, Eq height, C width, Floating a) => Vector height (RealOf a) -> Full vert horiz height width a -> Full vert horiz height width a Source #

scaleColumnsReal :: (C vert, C horiz, C height, C width, Eq width, Floating a) => Vector width (RealOf a) -> Full vert horiz height width a -> Full vert horiz height width a Source #

(\*#) :: (C vert, C horiz, C height, Eq height, C width, Floating a) => Vector height a -> Full vert horiz height width a -> Full vert horiz height width a infixr 7 Source #

(#*\) :: (C vert, C horiz, C height, C width, Eq width, Floating a) => Full vert horiz height width a -> Vector width a -> Full vert horiz height width a infixl 7 Source #

(\\#) :: (C vert, C horiz, C height, Eq height, C width, Floating a) => Vector height a -> Full vert horiz height width a -> Full vert horiz height width a infixr 7 Source #

(#/\) :: (C vert, C horiz, C height, C width, Eq width, Floating a) => Full vert horiz height width a -> Vector width a -> Full vert horiz height width a infixl 7 Source #

multiply :: (C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) => Full vert horiz height fuse a -> Full vert horiz fuse width a -> Full vert horiz height width a Source #

multiplyVector :: (C vert, C horiz, C height, C width, Eq width, Floating a) => Full vert horiz height width a -> Vector width a -> Vector height a Source #

zero :: (Homogeneous shape, Floating a) => shape -> ArrayMatrix shape a Source #

negate :: (Homogeneous shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a Source #

scale :: (Scale shape, Floating a) => a -> ArrayMatrix shape a -> ArrayMatrix shape a Source #

scaleReal :: (Homogeneous shape, Floating a) => RealOf a -> ArrayMatrix shape a -> ArrayMatrix shape a Source #

scaleRealReal :: (Homogeneous shape, Real a) => a -> ArrayMatrix shape a -> ArrayMatrix shape a Source #

(.*#) :: (Scale shape, Floating a) => a -> ArrayMatrix shape a -> ArrayMatrix shape a infixl 7 Source #

add :: (Additive shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a infixl 6 Source #

sub :: (Additive shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a infixl 6 Source #

(#+#) :: (Additive shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a infixl 6 Source #

(#-#) :: (Additive shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a infixl 6 Source #

class (Box typA, Box typB) => Multiply typA typB Source #

Minimal complete definition

matrixMatrix

Instances
(C shapeA, Eq shapeA, shapeA ~ shapeB, C shapeB) => Multiply (Permutation shapeA) (Permutation shapeB) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Associated Types

type Multiplied (Permutation shapeA) (Permutation shapeB) :: Type

Methods

matrixMatrix :: Floating a => Matrix (Permutation shapeA) a -> Matrix (Permutation shapeB) a -> Matrix (Multiplied (Permutation shapeA) (Permutation shapeB)) a

(Box shapeA, Box shapeB, Multiply shapeA shapeB) => Multiply (Array shapeA) (Array shapeB) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Associated Types

type Multiplied (Array shapeA) (Array shapeB) :: Type

Methods

matrixMatrix :: Floating a => Matrix (Array shapeA) a -> Matrix (Array shapeB) a -> Matrix (Multiplied (Array shapeA) (Array shapeB)) a

(#*#) :: (Multiply typA typB, Floating a) => Matrix typA a -> Matrix typB a -> Matrix (Multiplied typA typB) a infixl 7 Source #

class Box typ => MultiplyVector typ Source #

Minimal complete definition

matrixVector, vectorMatrix

Instances
C shape => MultiplyVector (Permutation shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Methods

matrixVector :: (WidthOf (Permutation shape) ~ width, Eq width, Floating a) => Matrix (Permutation shape) a -> Vector width a -> Vector (HeightOf (Permutation shape)) a

vectorMatrix :: (HeightOf (Permutation shape) ~ height, Eq height, Floating a) => Vector height a -> Matrix (Permutation shape) a -> Vector (WidthOf (Permutation shape)) a

MultiplyVector shape => MultiplyVector (Array shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Methods

matrixVector :: (WidthOf (Array shape) ~ width, Eq width, Floating a) => Matrix (Array shape) a -> Vector width a -> Vector (HeightOf (Array shape)) a

vectorMatrix :: (HeightOf (Array shape) ~ height, Eq height, Floating a) => Vector height a -> Matrix (Array shape) a -> Vector (WidthOf (Array shape)) a

(#*|) :: (MultiplyVector typ, WidthOf typ ~ width, Eq width, Floating a) => Matrix typ a -> Vector width a -> Vector (HeightOf typ) a infixr 7 Source #

(-*#) :: (MultiplyVector typ, HeightOf typ ~ height, Eq height, Floating a) => Vector height a -> Matrix typ a -> Vector (WidthOf typ) a infixl 7 Source #

class (Box typ, HeightOf typ ~ WidthOf typ) => MultiplySquare typ Source #

Minimal complete definition

transposableSquare | fullSquare, squareFull

Instances
C shape => MultiplySquare (Permutation shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Methods

transposableSquare :: (HeightOf (Permutation shape) ~ height, Eq height, C width, C horiz, C vert, Floating a) => Transposition -> Matrix (Permutation shape) a -> Full vert horiz height width a -> Full vert horiz height width a

squareFull :: (HeightOf (Permutation shape) ~ height, Eq height, C width, C horiz, C vert, Floating a) => Matrix (Permutation shape) a -> Full vert horiz height width a -> Full vert horiz height width a

fullSquare :: (WidthOf (Permutation shape) ~ width, Eq width, C height, C horiz, C vert, Floating a) => Full vert horiz height width a -> Matrix (Permutation shape) a -> Full vert horiz height width a

MultiplySquare shape => MultiplySquare (Array shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Methods

transposableSquare :: (HeightOf (Array shape) ~ height, Eq height, C width, C horiz, C vert, Floating a) => Transposition -> Matrix (Array shape) a -> Full vert horiz height width a -> Full vert horiz height width a

squareFull :: (HeightOf (Array shape) ~ height, Eq height, C width, C horiz, C vert, Floating a) => Matrix (Array shape) a -> Full vert horiz height width a -> Full vert horiz height width a

fullSquare :: (WidthOf (Array shape) ~ width, Eq width, C height, C horiz, C vert, Floating a) => Full vert horiz height width a -> Matrix (Array shape) a -> Full vert horiz height width a

multiplySquare :: (MultiplySquare typ, HeightOf typ ~ height, Eq height, C width, C horiz, C vert, Floating a) => Transposition -> Matrix typ a -> Full vert horiz height width a -> Full vert horiz height width a Source #

class (Box typ, HeightOf typ ~ WidthOf typ) => Power typ Source #

Minimal complete definition

square, power

Instances
C shape => Power (Permutation shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Methods

square :: Floating a => Matrix (Permutation shape) a -> Matrix (Permutation shape) a Source #

power :: Floating a => Int -> Matrix (Permutation shape) a -> Matrix (Permutation shape) a Source #

Power shape => Power (Array shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Methods

square :: Floating a => Matrix (Array shape) a -> Matrix (Array shape) a Source #

power :: Floating a => Int -> Matrix (Array shape) a -> Matrix (Array shape) a Source #

square :: (Power typ, Floating a) => Matrix typ a -> Matrix typ a Source #

power :: (Power typ, Floating a) => Int -> Matrix typ a -> Matrix typ a Source #

(##*#) :: (MultiplySquare typ, WidthOf typ ~ width, Eq width, C height, C horiz, C vert, Floating a) => Full vert horiz height width a -> Matrix typ a -> Full vert horiz height width a infixl 7 Source #

(#*##) :: (MultiplySquare typ, HeightOf typ ~ height, Eq height, C width, C horiz, C vert, Floating a) => Matrix typ a -> Full vert horiz height width a -> Full vert horiz height width a infixr 7 Source #

class Box typ => Indexed typ Source #

Minimal complete definition

(#!)

Instances
Indexed size => Indexed (Permutation size) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Indexed

Methods

(#!) :: Floating a => Matrix (Permutation size) a -> (Index (HeightOf (Permutation size)), Index (WidthOf (Permutation size))) -> a Source #

Indexed sh => Indexed (Array sh) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Indexed

Methods

(#!) :: Floating a => Matrix (Array sh) a -> (Index (HeightOf (Array sh)), Index (WidthOf (Array sh))) -> a Source #

(#!) :: (Indexed typ, Floating a) => Matrix typ a -> (Index (HeightOf typ), Index (WidthOf typ)) -> a infixl 9 Source #

class (Box typ, HeightOf typ ~ WidthOf typ) => Determinant typ Source #

Minimal complete definition

determinant

Instances
C shape => Determinant (Permutation shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Divide

Methods

determinant :: Floating a => Matrix (Permutation shape) a -> a Source #

Determinant shape => Determinant (Array shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Divide

Methods

determinant :: Floating a => Matrix (Array shape) a -> a Source #

determinant :: (Determinant typ, Floating a) => Matrix typ a -> a Source #

class (Box typ, HeightOf typ ~ WidthOf typ) => Solve typ Source #

Minimal complete definition

solve | solveLeft, solveRight

Instances
C shape => Solve (Permutation shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Divide

Methods

solve :: (HeightOf (Permutation shape) ~ height, Eq height, C width, C horiz, C vert, Floating a) => Transposition -> Matrix (Permutation shape) a -> Full vert horiz height width a -> Full vert horiz height width a Source #

solveRight :: (HeightOf (Permutation shape) ~ height, Eq height, C width, C horiz, C vert, Floating a) => Matrix (Permutation shape) a -> Full vert horiz height width a -> Full vert horiz height width a Source #

solveLeft :: (WidthOf (Permutation shape) ~ width, Eq width, C height, C horiz, C vert, Floating a) => Full vert horiz height width a -> Matrix (Permutation shape) a -> Full vert horiz height width a Source #

Solve shape => Solve (Array shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Divide

Methods

solve :: (HeightOf (Array shape) ~ height, Eq height, C width, C horiz, C vert, Floating a) => Transposition -> Matrix (Array shape) a -> Full vert horiz height width a -> Full vert horiz height width a Source #

solveRight :: (HeightOf (Array shape) ~ height, Eq height, C width, C horiz, C vert, Floating a) => Matrix (Array shape) a -> Full vert horiz height width a -> Full vert horiz height width a Source #

solveLeft :: (WidthOf (Array shape) ~ width, Eq width, C height, C horiz, C vert, Floating a) => Full vert horiz height width a -> Matrix (Array shape) a -> Full vert horiz height width a Source #

solve :: (Solve typ, HeightOf typ ~ height, Eq height, C width, C horiz, C vert, Floating a) => Transposition -> Matrix typ a -> Full vert horiz height width a -> Full vert horiz height width a Source #

solveLeft :: (Solve typ, WidthOf typ ~ width, Eq width, C height, C horiz, C vert, Floating a) => Full vert horiz height width a -> Matrix typ a -> Full vert horiz height width a Source #

solveRight :: (Solve typ, HeightOf typ ~ height, Eq height, C width, C horiz, C vert, Floating a) => Matrix typ a -> Full vert horiz height width a -> Full vert horiz height width a Source #

(##/#) :: (Solve typ, WidthOf typ ~ width, Eq width, C height, C horiz, C vert, Floating a) => Full vert horiz height width a -> Matrix typ a -> Full vert horiz height width a infixl 7 Source #

(#\##) :: (Solve typ, HeightOf typ ~ height, Eq height, C width, C horiz, C vert, Floating a) => Matrix typ a -> Full vert horiz height width a -> Full vert horiz height width a infixr 7 Source #

solveVector :: (Solve typ, HeightOf typ ~ height, Eq height, Floating a) => Transposition -> Matrix typ a -> Vector height a -> Vector height a Source #

(-/#) :: (Solve typ, HeightOf typ ~ height, Eq height, Floating a) => Vector height a -> Matrix typ a -> Vector height a infixl 7 Source #

(#\|) :: (Solve typ, HeightOf typ ~ height, Eq height, Floating a) => Matrix typ a -> Vector height a -> Vector height a infixr 7 Source #

class (Solve typ, Power typ) => Inverse typ Source #

Minimal complete definition

inverse

Instances
C shape => Inverse (Permutation shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Divide

Methods

inverse :: Floating a => Matrix (Permutation shape) a -> Matrix (Permutation shape) a Source #

Inverse shape => Inverse (Array shape) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Divide

Methods

inverse :: Floating a => Matrix (Array shape) a -> Matrix (Array shape) a Source #

inverse :: (Inverse typ, Floating a) => Matrix typ a -> Matrix typ a Source #

data Transposition Source #

Constructors

NonTransposed 
Transposed 
Instances
Bounded Transposition Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Modifier

Enum Transposition Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Modifier

Eq Transposition Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Modifier

Show Transposition Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Modifier

Semigroup Transposition Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Modifier

Monoid Transposition Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Modifier