Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data family Matrix typ a
- type ArrayMatrix shape = Matrix (Array shape)
- data Array shape
- type Full vert horiz height width = ArrayMatrix (Full vert horiz height width)
- type General height width = ArrayMatrix (General height width)
- type Tall height width = ArrayMatrix (Tall height width)
- type Wide height width = ArrayMatrix (Wide height width)
- type Square sh = ArrayMatrix (Square sh)
- shape :: ArrayMatrix sh a -> sh
- reshape :: (C sh0, C sh1) => sh1 -> ArrayMatrix sh0 a -> ArrayMatrix sh1 a
- mapShape :: (C sh0, C sh1) => (sh0 -> sh1) -> ArrayMatrix sh0 a -> ArrayMatrix sh1 a
- toVector :: ArrayMatrix sh a -> Array sh a
- fromVector :: (Admissible sh, Floating a) => Array sh a -> ArrayMatrix sh a
- lift0 :: Array shA a -> ArrayMatrix shA a
- lift1 :: (Array shA a -> Array shB b) -> ArrayMatrix shA a -> ArrayMatrix shB b
- lift2 :: (Array shA a -> Array shB b -> Array shC c) -> ArrayMatrix shA a -> ArrayMatrix shB b -> ArrayMatrix shC c
- lift3 :: (Array shA a -> Array shB b -> Array shC c -> Array shD d) -> ArrayMatrix shA a -> ArrayMatrix shB b -> ArrayMatrix shC c -> ArrayMatrix shD d
- lift4 :: (Array shA a -> Array shB b -> Array shC c -> Array shD d -> Array shE e) -> ArrayMatrix shA a -> ArrayMatrix shB b -> ArrayMatrix shC c -> ArrayMatrix shD d -> ArrayMatrix shE e
- unlift1 :: (ArrayMatrix shA a -> ArrayMatrix shB b) -> Array shA a -> Array shB b
- unlift2 :: (ArrayMatrix shA a -> ArrayMatrix shB b -> ArrayMatrix shC c) -> Array shA a -> Array shB b -> Array shC c
- unliftRow :: Order -> (General () height0 a -> General () height1 b) -> Vector height0 a -> Vector height1 b
- unliftColumn :: Order -> (General height0 () a -> General height1 () b) -> Vector height0 a -> Vector height1 b
- class C shape => Homogeneous shape
- zero :: (Homogeneous shape, Floating a) => shape -> ArrayMatrix shape a
- negate :: (Homogeneous shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a
- scaleReal :: (Homogeneous shape, Floating a) => RealOf a -> ArrayMatrix shape a -> ArrayMatrix shape a
- scale :: (Scale shape, Floating a) => a -> ArrayMatrix shape a -> ArrayMatrix shape a
- scaleRealReal :: (Homogeneous shape, Real a) => a -> ArrayMatrix shape a -> ArrayMatrix shape a
- (.*#) :: (Scale shape, Floating a) => a -> ArrayMatrix shape a -> ArrayMatrix shape a
- class C shape => ShapeOrder shape
- forceOrder :: (ShapeOrder shape, Floating a) => Order -> ArrayMatrix shape a -> ArrayMatrix shape a
- shapeOrder :: ShapeOrder shape => shape -> Order
- adaptOrder :: (ShapeOrder shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a
- class (Homogeneous shape, Eq shape) => Additive shape
- add :: (Additive shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a
- sub :: (Additive shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a
- (#+#) :: (Additive shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a
- (#-#) :: (Additive shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a -> ArrayMatrix shape a
- class C shape => Complex shape
- class (Box shape, HeightOf shape ~ WidthOf shape) => SquareShape shape
- class Box shape => MultiplyVector shape
- class SquareShape shape => MultiplySquare shape
- class SquareShape shape => Power shape
- class (C shapeA, C shapeB) => Multiply shapeA shapeB
- class SquareShape shape => Determinant shape
- class SquareShape shape => Solve shape
- class (Solve shape, Power shape) => Inverse shape
Documentation
data family Matrix typ a Source #
Instances
(C sh, Show sh) => Show (Matrix (Permutation sh) a) Source # | |
Defined in Numeric.LAPACK.Matrix.Type | |
(C shape, Storable a, Show shape, Show a) => Show (Matrix (Array shape) a) Source # | |
(MultiplySame typ, Floating a) => Semigroup (Matrix typ a) Source # | |
(MultiplySame typ, StaticIdentity typ, Floating a) => Monoid (Matrix typ a) Source # | |
(NFData typ, NFData a) => NFData (Matrix typ a) Source # | |
Defined in Numeric.LAPACK.Matrix.Type | |
(FormatMatrix typ, Floating a) => Display (Matrix typ a) Source # | |
Defined in Numeric.LAPACK.Matrix.Type | |
(FormatMatrix typ, Floating a) => Format (Matrix typ a) Source # | |
newtype Matrix (Permutation sh) a Source # | |
Defined in Numeric.LAPACK.Matrix.Type | |
newtype Matrix (Array shape) a Source # | |
Defined in Numeric.LAPACK.Matrix.Array |
type ArrayMatrix shape = Matrix (Array shape) Source #
Instances
Box sh => Box (Array sh) Source # | |
FormatArray sh => FormatMatrix (Array sh) Source # | |
Defined in Numeric.LAPACK.Matrix.Array | |
Indexed sh => Indexed (Array sh) Source # | |
SquareShape sh => SquareShape (Array sh) Source # | |
Defined in Numeric.LAPACK.Matrix.Class | |
Complex sh => Complex (Array sh) Source # | |
Power shape => Power (Array shape) Source # | |
MultiplySquare shape => MultiplySquare (Array shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Multiply transposableSquare :: (HeightOf (Array shape) ~ height, Eq height, C width, C vert, C horiz, 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 vert, C horiz, 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 vert, C horiz, Floating a) => Full vert horiz height width a -> Matrix (Array shape) a -> Full vert horiz height width a | |
MultiplyVector shape => MultiplyVector (Array shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Multiply 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 | |
Inverse shape => Inverse (Array shape) Source # | |
Solve shape => Solve (Array shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Divide solve :: (HeightOf (Array shape) ~ height, Eq height, C width, C vert, C horiz, 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 vert, C horiz, 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 vert, C horiz, Floating a) => Full vert horiz height width a -> Matrix (Array shape) a -> Full vert horiz height width a Source # | |
Determinant shape => Determinant (Array shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Divide | |
(Box shapeA, Box shapeB, Multiply shapeA shapeB) => Multiply (Array shapeA) (Array shapeB) Source # | |
(C shape, Storable a, Show shape, Show a) => Show (Matrix (Array shape) a) Source # | |
type HeightOf (Array sh) Source # | |
Defined in Numeric.LAPACK.Matrix.Array | |
type WidthOf (Array sh) Source # | |
Defined in Numeric.LAPACK.Matrix.Array | |
newtype Matrix (Array shape) a Source # | |
Defined in Numeric.LAPACK.Matrix.Array |
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 Square sh = ArrayMatrix (Square sh) Source #
shape :: ArrayMatrix sh a -> sh 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 #
toVector :: ArrayMatrix sh a -> Array sh a Source #
fromVector :: (Admissible sh, Floating a) => Array sh a -> ArrayMatrix sh a Source #
lift0 :: Array shA a -> ArrayMatrix shA a Source #
lift0
is a synonym for fromVector
but lacks the admissibility check.
You may thus fool the type tags.
This applies to the other lift functions, too.
lift1 :: (Array shA a -> Array shB b) -> ArrayMatrix shA a -> ArrayMatrix shB b Source #
lift2 :: (Array shA a -> Array shB b -> Array shC c) -> ArrayMatrix shA a -> ArrayMatrix shB b -> ArrayMatrix shC c Source #
lift3 :: (Array shA a -> Array shB b -> Array shC c -> Array shD d) -> ArrayMatrix shA a -> ArrayMatrix shB b -> ArrayMatrix shC c -> ArrayMatrix shD d Source #
lift4 :: (Array shA a -> Array shB b -> Array shC c -> Array shD d -> Array shE e) -> ArrayMatrix shA a -> ArrayMatrix shB b -> ArrayMatrix shC c -> ArrayMatrix shD d -> ArrayMatrix shE e Source #
unlift1 :: (ArrayMatrix shA a -> ArrayMatrix shB b) -> Array shA a -> Array shB b Source #
unlift2 :: (ArrayMatrix shA a -> ArrayMatrix shB b -> ArrayMatrix shC c) -> Array shA a -> Array shB b -> Array shC c 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 #
class C shape => Homogeneous shape Source #
Instances
C size => Homogeneous (Hermitian size) Source # | |
(Natural off, C size) => Homogeneous (BandedHermitian off size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class zero :: Floating a => BandedHermitian off size -> Array (BandedHermitian off size) a negate :: Floating a => Array (BandedHermitian off size) a -> Array (BandedHermitian off size) a scaleReal :: Floating a => RealOf a -> Array (BandedHermitian off size) a -> Array (BandedHermitian off size) a | |
(Content lo, NonUnit ~ diag, Content up, C size) => Homogeneous (Triangular lo diag up size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class zero :: Floating a => Triangular lo diag up size -> Array (Triangular lo diag up size) a negate :: Floating a => Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a scaleReal :: Floating a => RealOf a -> Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a | |
(C vert, C horiz, C height, C width) => Homogeneous (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class zero :: Floating a => Full vert horiz height width -> Array (Full vert horiz height width) a negate :: Floating a => Array (Full vert horiz height width) a -> Array (Full vert horiz height width) a scaleReal :: Floating a => RealOf a -> Array (Full vert horiz height width) a -> Array (Full vert horiz height width) a | |
(Natural sub, Natural super, C vert, C horiz, C height, C width) => Homogeneous (Banded sub super vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class zero :: Floating a => Banded sub super vert horiz height width -> Array (Banded sub super vert horiz height width) a negate :: Floating a => Array (Banded sub super vert horiz height width) a -> Array (Banded sub super vert horiz height width) a scaleReal :: Floating a => RealOf a -> Array (Banded sub super vert horiz height width) a -> Array (Banded sub super vert horiz height width) a |
zero :: (Homogeneous shape, Floating a) => shape -> ArrayMatrix shape a Source #
negate :: (Homogeneous shape, Floating a) => ArrayMatrix shape a -> ArrayMatrix shape a Source #
scaleReal :: (Homogeneous shape, Floating a) => RealOf a -> ArrayMatrix shape a -> ArrayMatrix shape a Source #
scale :: (Scale shape, Floating a) => 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 #
class C shape => ShapeOrder shape Source #
forceOrder, shapeOrder
Instances
C size => ShapeOrder (Hermitian size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class | |
(Content lo, TriDiag diag, Content up, C size) => ShapeOrder (Triangular lo diag up size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class forceOrder :: Floating a => Order -> Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a shapeOrder :: Triangular lo diag up size -> Order Source # | |
(C vert, C horiz, C height, C width) => ShapeOrder (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class |
forceOrder :: (ShapeOrder shape, Floating a) => Order -> ArrayMatrix shape a -> ArrayMatrix shape a Source #
shapeOrder :: ShapeOrder shape => shape -> Order 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
.
class (Homogeneous shape, Eq shape) => Additive shape Source #
add
Instances
(C size, Eq size) => Additive (Hermitian size) Source # | |
(Content lo, Eq lo, NonUnit ~ diag, Content up, Eq up, C size, Eq size) => Additive (Triangular lo diag up size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class add :: Floating a => Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a sub :: Floating a => Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a | |
(C vert, C horiz, C height, Eq height, C width, Eq width) => Additive (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class |
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 C shape => Complex shape Source #
Instances
C size => Complex (Hermitian size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class | |
(Natural off, C size) => Complex (BandedHermitian off size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class conjugate :: Floating a => Array (BandedHermitian off size) a -> Array (BandedHermitian off size) a fromReal :: Floating a => Array (BandedHermitian off size) (RealOf a) -> Array (BandedHermitian off size) a toComplex :: Floating a => Array (BandedHermitian off size) a -> Array (BandedHermitian off size) (ComplexOf a) | |
(Content lo, TriDiag diag, Content up, C size) => Complex (Triangular lo diag up size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class conjugate :: Floating a => Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a fromReal :: Floating a => Array (Triangular lo diag up size) (RealOf a) -> Array (Triangular lo diag up size) a toComplex :: Floating a => Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) (ComplexOf a) | |
(C vert, C horiz, C height, C width) => Complex (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class conjugate :: Floating a => Array (Full vert horiz height width) a -> Array (Full vert horiz height width) a fromReal :: Floating a => Array (Full vert horiz height width) (RealOf a) -> Array (Full vert horiz height width) a toComplex :: Floating a => Array (Full vert horiz height width) a -> Array (Full vert horiz height width) (ComplexOf a) | |
(Natural sub, Natural super, C vert, C horiz, C height, C width) => Complex (Banded sub super vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class conjugate :: Floating a => Array (Banded sub super vert horiz height width) a -> Array (Banded sub super vert horiz height width) a fromReal :: Floating a => Array (Banded sub super vert horiz height width) (RealOf a) -> Array (Banded sub super vert horiz height width) a toComplex :: Floating a => Array (Banded sub super vert horiz height width) a -> Array (Banded sub super vert horiz height width) (ComplexOf a) |
class (Box shape, HeightOf shape ~ WidthOf shape) => SquareShape shape Source #
toSquare, identityOrder, takeDiagonal
Instances
C size => SquareShape (Hermitian size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class toSquare :: (HeightOf (Hermitian size) ~ sh, Floating a) => Array (Hermitian size) a -> Square sh a identityOrder :: (HeightOf (Hermitian size) ~ sh, Floating a) => Order -> sh -> Array (Hermitian size) a takeDiagonal :: (HeightOf (Hermitian size) ~ sh, Floating a) => Array (Hermitian size) a -> Vector sh a | |
(Natural offDiag, C size) => SquareShape (BandedHermitian offDiag size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class toSquare :: (HeightOf (BandedHermitian offDiag size) ~ sh, Floating a) => Array (BandedHermitian offDiag size) a -> Square sh a identityOrder :: (HeightOf (BandedHermitian offDiag size) ~ sh, Floating a) => Order -> sh -> Array (BandedHermitian offDiag size) a takeDiagonal :: (HeightOf (BandedHermitian offDiag size) ~ sh, Floating a) => Array (BandedHermitian offDiag size) a -> Vector sh a | |
(Content lo, TriDiag diag, Content up, C size) => SquareShape (Triangular lo diag up size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class toSquare :: (HeightOf (Triangular lo diag up size) ~ sh, Floating a) => Array (Triangular lo diag up size) a -> Square sh a identityOrder :: (HeightOf (Triangular lo diag up size) ~ sh, Floating a) => Order -> sh -> Array (Triangular lo diag up size) a takeDiagonal :: (HeightOf (Triangular lo diag up size) ~ sh, Floating a) => Array (Triangular lo diag up size) a -> Vector sh a | |
(Small ~ vert, Small ~ horiz, C height, height ~ width) => SquareShape (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class toSquare :: (HeightOf (Full vert horiz height width) ~ sh, Floating a) => Array (Full vert horiz height width) a -> Square sh a identityOrder :: (HeightOf (Full vert horiz height width) ~ sh, Floating a) => Order -> sh -> Array (Full vert horiz height width) a takeDiagonal :: (HeightOf (Full vert horiz height width) ~ sh, Floating a) => Array (Full vert horiz height width) a -> Vector sh a | |
(Natural sub, Natural super, Small ~ vert, Small ~ horiz, C height, height ~ width) => SquareShape (Banded sub super vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Class toSquare :: (HeightOf (Banded sub super vert horiz height width) ~ sh, Floating a) => Array (Banded sub super vert horiz height width) a -> Square sh a identityOrder :: (HeightOf (Banded sub super vert horiz height width) ~ sh, Floating a) => Order -> sh -> Array (Banded sub super vert horiz height width) a takeDiagonal :: (HeightOf (Banded sub super vert horiz height width) ~ sh, Floating a) => Array (Banded sub super vert horiz height width) a -> Vector sh a |
class Box shape => MultiplyVector shape Source #
matrixVector, vectorMatrix
Instances
C shape => MultiplyVector (Hermitian shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply matrixVector :: (WidthOf (Hermitian shape) ~ width, Eq width, Floating a) => Array (Hermitian shape) a -> Vector width a -> Vector (HeightOf (Hermitian shape)) a vectorMatrix :: (HeightOf (Hermitian shape) ~ height, Eq height, Floating a) => Vector height a -> Array (Hermitian shape) a -> Vector (WidthOf (Hermitian shape)) a | |
(Natural offDiag, C size) => MultiplyVector (BandedHermitian offDiag size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply matrixVector :: (WidthOf (BandedHermitian offDiag size) ~ width, Eq width, Floating a) => Array (BandedHermitian offDiag size) a -> Vector width a -> Vector (HeightOf (BandedHermitian offDiag size)) a vectorMatrix :: (HeightOf (BandedHermitian offDiag size) ~ height, Eq height, Floating a) => Vector height a -> Array (BandedHermitian offDiag size) a -> Vector (WidthOf (BandedHermitian offDiag size)) a | |
(Content lo, Content up, TriDiag diag, C shape) => MultiplyVector (Triangular lo diag up shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply matrixVector :: (WidthOf (Triangular lo diag up shape) ~ width, Eq width, Floating a) => Array (Triangular lo diag up shape) a -> Vector width a -> Vector (HeightOf (Triangular lo diag up shape)) a vectorMatrix :: (HeightOf (Triangular lo diag up shape) ~ height, Eq height, Floating a) => Vector height a -> Array (Triangular lo diag up shape) a -> Vector (WidthOf (Triangular lo diag up shape)) a | |
(C vert, C horiz, C width, C height) => MultiplyVector (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply matrixVector :: (WidthOf (Full vert horiz height width) ~ width0, Eq width0, Floating a) => Array (Full vert horiz height width) a -> Vector width0 a -> Vector (HeightOf (Full vert horiz height width)) a vectorMatrix :: (HeightOf (Full vert horiz height width) ~ height0, Eq height0, Floating a) => Vector height0 a -> Array (Full vert horiz height width) a -> Vector (WidthOf (Full vert horiz height width)) a | |
(Natural sub, Natural super, C vert, C horiz, C height, C width) => MultiplyVector (Banded sub super vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply matrixVector :: (WidthOf (Banded sub super vert horiz height width) ~ width0, Eq width0, Floating a) => Array (Banded sub super vert horiz height width) a -> Vector width0 a -> Vector (HeightOf (Banded sub super vert horiz height width)) a vectorMatrix :: (HeightOf (Banded sub super vert horiz height width) ~ height0, Eq height0, Floating a) => Vector height0 a -> Array (Banded sub super vert horiz height width) a -> Vector (WidthOf (Banded sub super vert horiz height width)) a |
class SquareShape shape => MultiplySquare shape Source #
transposableSquare | fullSquare, squareFull
Instances
C shape => MultiplySquare (Hermitian shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply transposableSquare :: (HeightOf (Hermitian shape) ~ height, Eq height, C width, C vert, C horiz, Floating a) => Transposition -> Array (Hermitian shape) a -> Full vert horiz height width a -> Full vert horiz height width a squareFull :: (HeightOf (Hermitian shape) ~ height, Eq height, C width, C vert, C horiz, Floating a) => Array (Hermitian shape) a -> Full vert horiz height width a -> Full vert horiz height width a fullSquare :: (WidthOf (Hermitian shape) ~ width, Eq width, C height, C vert, C horiz, Floating a) => Full vert horiz height width a -> Array (Hermitian shape) a -> Full vert horiz height width a | |
(Natural offDiag, C size) => MultiplySquare (BandedHermitian offDiag size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply transposableSquare :: (HeightOf (BandedHermitian offDiag size) ~ height, Eq height, C width, C vert, C horiz, Floating a) => Transposition -> Array (BandedHermitian offDiag size) a -> Full vert horiz height width a -> Full vert horiz height width a squareFull :: (HeightOf (BandedHermitian offDiag size) ~ height, Eq height, C width, C vert, C horiz, Floating a) => Array (BandedHermitian offDiag size) a -> Full vert horiz height width a -> Full vert horiz height width a fullSquare :: (WidthOf (BandedHermitian offDiag size) ~ width, Eq width, C height, C vert, C horiz, Floating a) => Full vert horiz height width a -> Array (BandedHermitian offDiag size) a -> Full vert horiz height width a | |
(Content lo, Content up, TriDiag diag, C shape) => MultiplySquare (Triangular lo diag up shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply transposableSquare :: (HeightOf (Triangular lo diag up shape) ~ height, Eq height, C width, C vert, C horiz, Floating a) => Transposition -> Array (Triangular lo diag up shape) a -> Full vert horiz height width a -> Full vert horiz height width a squareFull :: (HeightOf (Triangular lo diag up shape) ~ height, Eq height, C width, C vert, C horiz, Floating a) => Array (Triangular lo diag up shape) a -> Full vert horiz height width a -> Full vert horiz height width a fullSquare :: (WidthOf (Triangular lo diag up shape) ~ width, Eq width, C height, C vert, C horiz, Floating a) => Full vert horiz height width a -> Array (Triangular lo diag up shape) a -> Full vert horiz height width a | |
(vert ~ Small, horiz ~ Small, C height, height ~ width) => MultiplySquare (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply transposableSquare :: (HeightOf (Full vert horiz height width) ~ height0, Eq height0, C width0, C vert0, C horiz0, Floating a) => Transposition -> Array (Full vert horiz height width) a -> Full0 vert0 horiz0 height0 width0 a -> Full0 vert0 horiz0 height0 width0 a squareFull :: (HeightOf (Full vert horiz height width) ~ height0, Eq height0, C width0, C vert0, C horiz0, Floating a) => Array (Full vert horiz height width) a -> Full0 vert0 horiz0 height0 width0 a -> Full0 vert0 horiz0 height0 width0 a fullSquare :: (WidthOf (Full vert horiz height width) ~ width0, Eq width0, C height0, C vert0, C horiz0, Floating a) => Full0 vert0 horiz0 height0 width0 a -> Array (Full vert horiz height width) a -> Full0 vert0 horiz0 height0 width0 a | |
(Natural sub, Natural super, vert ~ Small, horiz ~ Small, C height, height ~ width) => MultiplySquare (Banded sub super vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply transposableSquare :: (HeightOf (Banded sub super vert horiz height width) ~ height0, Eq height0, C width0, C vert0, C horiz0, Floating a) => Transposition -> Array (Banded sub super vert horiz height width) a -> Full vert0 horiz0 height0 width0 a -> Full vert0 horiz0 height0 width0 a squareFull :: (HeightOf (Banded sub super vert horiz height width) ~ height0, Eq height0, C width0, C vert0, C horiz0, Floating a) => Array (Banded sub super vert horiz height width) a -> Full vert0 horiz0 height0 width0 a -> Full vert0 horiz0 height0 width0 a fullSquare :: (WidthOf (Banded sub super vert horiz height width) ~ width0, Eq width0, C height0, C vert0, C horiz0, Floating a) => Full vert0 horiz0 height0 width0 a -> Array (Banded sub super vert horiz height width) a -> Full vert0 horiz0 height0 width0 a |
class SquareShape shape => Power shape Source #
square, power
Instances
C size => Power (Hermitian size) Source # | |
(PowerContentDiag lo diag up, C size) => Power (Triangular lo diag up size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply square :: Floating a => Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a power :: Floating a => Int -> Array (Triangular lo diag up size) a -> Array (Triangular lo diag up size) a | |
(Small ~ vert, Small ~ horiz, C height, height ~ width) => Power (Full vert horiz height width) Source # | |
class (C shapeA, C shapeB) => Multiply shapeA shapeB Source #
This class allows to Basic.multiply two matrices of arbitrary special features
and returns the most special matrix type possible.
At the first glance, this is handy.
At the second glance, this has some problems.
First of all, we may refine the types in future
and then multiplication may return a different, more special type than before.
Second, if you write code with polymorphic matrix types,
then matrixMatrix
may leave you with constraints like
ExtentPriv.Multiply vert vert ~ vert
.
That constraint is always fulfilled but the compiler cannot infer that.
Because of these problems
you may instead consider using specialised multiply
functions
from the various modules for production use.
Btw. MultiplyVector
and MultiplySquare
are much less problematic,
because the input and output are always dense vectors or dense matrices.
matrixMatrix
Instances
(C shapeA, shapeA ~ shapeB, Eq shapeB) => Multiply (Hermitian shapeA) (Hermitian shapeB) Source # | |
(C vert, C horiz, C size, size ~ height, Eq height, C width) => Multiply (Hermitian size) (Full vert horiz height width) Source # | |
(Natural offDiagA, Natural offDiagB, C sizeA, sizeA ~ sizeB, C sizeB, Eq sizeB) => Multiply (BandedHermitian offDiagA sizeA) (BandedHermitian offDiagB sizeB) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply type Multiplied (BandedHermitian offDiagA sizeA) (BandedHermitian offDiagB sizeB) matrixMatrix :: Floating a => Array (BandedHermitian offDiagA sizeA) a -> Array (BandedHermitian offDiagB sizeB) a -> Array (Multiplied (BandedHermitian offDiagA sizeA) (BandedHermitian offDiagB sizeB)) a | |
(Natural offDiag, C vert, C horiz, C size, size ~ height, Eq height, C width, Eq width) => Multiply (BandedHermitian offDiag size) (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply type Multiplied (BandedHermitian offDiag size) (Full vert horiz height width) matrixMatrix :: Floating a => Array (BandedHermitian offDiag size) a -> Array (Full vert horiz height width) a -> Array (Multiplied (BandedHermitian offDiag size) (Full vert horiz height width)) a | |
(Natural offDiag, Natural sub, Natural super, C vert, C horiz, C size, size ~ height, Eq height, C width, Eq width) => Multiply (BandedHermitian offDiag size) (Banded sub super vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply type Multiplied (BandedHermitian offDiag size) (Banded sub super vert horiz height width) matrixMatrix :: Floating a => Array (BandedHermitian offDiag size) a -> Array (Banded sub super vert horiz height width) a -> Array (Multiplied (BandedHermitian offDiag size) (Banded sub super vert horiz height width)) a | |
(C vert, C horiz, C size, size ~ width, Eq width, C height) => Multiply (Full vert horiz height width) (Hermitian size) Source # | |
(Natural offDiag, C vert, C horiz, C size, size ~ width, Eq width, C height, Eq height) => Multiply (Full vert horiz height width) (BandedHermitian offDiag size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply type Multiplied (Full vert horiz height width) (BandedHermitian offDiag size) matrixMatrix :: Floating a => Array (Full vert horiz height width) a -> Array (BandedHermitian offDiag size) a -> Array (Multiplied (Full vert horiz height width) (BandedHermitian offDiag size)) a | |
(C sizeA, sizeA ~ sizeB, Eq sizeB, MultiplyTriangular loA upA loB upB, TriDiag diagA, TriDiag diagB) => Multiply (Triangular loA diagA upA sizeA) (Triangular loB diagB upB sizeB) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply type Multiplied (Triangular loA diagA upA sizeA) (Triangular loB diagB upB sizeB) matrixMatrix :: Floating a => Array (Triangular loA diagA upA sizeA) a -> Array (Triangular loB diagB upB sizeB) a -> Array (Multiplied (Triangular loA diagA upA sizeA) (Triangular loB diagB upB sizeB)) a | |
(Content lo, Content up, TriDiag diag, C vert, C horiz, C size, size ~ height, Eq height, C width) => Multiply (Triangular lo diag up size) (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply type Multiplied (Triangular lo diag up size) (Full vert horiz height width) matrixMatrix :: Floating a => Array (Triangular lo diag up size) a -> Array (Full vert horiz height width) a -> Array (Multiplied (Triangular lo diag up size) (Full vert horiz height width)) a | |
(Content lo, Content up, TriDiag diag, C vert, C horiz, C size, size ~ width, Eq width, C height) => Multiply (Full vert horiz height width) (Triangular lo diag up size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply type Multiplied (Full vert horiz height width) (Triangular lo diag up size) matrixMatrix :: Floating a => Array (Full vert horiz height width) a -> Array (Triangular lo diag up size) a -> Array (Multiplied (Full vert horiz height width) (Triangular lo diag up size)) a | |
(C heightA, C widthA, C widthB, widthA ~ heightB, Eq heightB, C vertA, C horizA, C vertB, C horizB) => Multiply (Full vertA horizA heightA widthA) (Full vertB horizB heightB widthB) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply | |
(Natural sub, Natural super, C vertA, C horizA, C vertB, C horizB, C heightA, C widthA, C widthB, widthA ~ heightB, Eq heightB) => Multiply (Full vertA horizA heightA widthA) (Banded sub super vertB horizB heightB widthB) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply | |
(Natural offDiag, Natural sub, Natural super, C vert, C horiz, C size, size ~ width, Eq width, C height, Eq height) => Multiply (Banded sub super vert horiz height width) (BandedHermitian offDiag size) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply type Multiplied (Banded sub super vert horiz height width) (BandedHermitian offDiag size) matrixMatrix :: Floating a => Array (Banded sub super vert horiz height width) a -> Array (BandedHermitian offDiag size) a -> Array (Multiplied (Banded sub super vert horiz height width) (BandedHermitian offDiag size)) a | |
(Natural sub, Natural super, C vertA, C horizA, C vertB, C horizB, C heightA, C widthA, C widthB, widthA ~ heightB, Eq heightB) => Multiply (Banded sub super vertA horizA heightA widthA) (Full vertB horizB heightB widthB) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply | |
(Natural subA, Natural superA, Natural subB, Natural superB, C vertA, C horizA, C vertB, C horizB, C heightA, C widthA, C widthB, widthA ~ heightB, Eq heightB) => Multiply (Banded subA superA vertA horizA heightA widthA) (Banded subB superB vertB horizB heightB widthB) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Multiply |
class SquareShape shape => Determinant shape Source #
determinant
Instances
C shape => Determinant (Hermitian shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Divide determinant :: Floating a => Array (Hermitian shape) a -> a | |
(Natural offDiag, C size) => Determinant (BandedHermitian offDiag size) Source # | There is no solver for general banded Hermitian matrices. Thus the instance will fail for an indefinite matrix. |
Defined in Numeric.LAPACK.Matrix.Plain.Divide determinant :: Floating a => Array (BandedHermitian offDiag size) a -> a | |
(Content lo, Content up, TriDiag diag, C shape) => Determinant (Triangular lo diag up shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Divide determinant :: Floating a => Array (Triangular lo diag up shape) a -> a | |
(vert ~ Small, horiz ~ Small, C height, height ~ width) => Determinant (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Divide determinant :: Floating a => Array (Full vert horiz height width) a -> a | |
(Natural sub, Natural super, vert ~ Small, horiz ~ Small, C width, C height, width ~ height) => Determinant (Banded sub super vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Divide determinant :: Floating a => Array (Banded sub super vert horiz height width) a -> a |
class SquareShape shape => Solve shape Source #
solve | solveLeft, solveRight
Instances
C shape => Solve (Hermitian shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Divide solve :: (Floating a, HeightOf (Hermitian shape) ~ height, Eq height, C vert, C horiz, C width) => Transposition -> Array (Hermitian shape) a -> Full vert horiz height width a -> Full vert horiz height width a solveRight :: (Floating a, HeightOf (Hermitian shape) ~ height, Eq height, C vert, C horiz, C width) => Array (Hermitian shape) a -> Full vert horiz height width a -> Full vert horiz height width a solveLeft :: (Floating a, HeightOf (Hermitian shape) ~ width, Eq width, C vert, C horiz, C height) => Full vert horiz height width a -> Array (Hermitian shape) a -> Full vert horiz height width a | |
(Natural offDiag, C size) => Solve (BandedHermitian offDiag size) Source # | There is no solver for indefinite matrices. Thus the instance will fail for indefinite but solvable systems. |
Defined in Numeric.LAPACK.Matrix.Plain.Divide solve :: (Floating a, HeightOf (BandedHermitian offDiag size) ~ height, Eq height, C vert, C horiz, C width) => Transposition -> Array (BandedHermitian offDiag size) a -> Full vert horiz height width a -> Full vert horiz height width a solveRight :: (Floating a, HeightOf (BandedHermitian offDiag size) ~ height, Eq height, C vert, C horiz, C width) => Array (BandedHermitian offDiag size) a -> Full vert horiz height width a -> Full vert horiz height width a solveLeft :: (Floating a, HeightOf (BandedHermitian offDiag size) ~ width, Eq width, C vert, C horiz, C height) => Full vert horiz height width a -> Array (BandedHermitian offDiag size) a -> Full vert horiz height width a | |
(Content lo, Content up, TriDiag diag, C shape) => Solve (Triangular lo diag up shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Divide solve :: (Floating a, HeightOf (Triangular lo diag up shape) ~ height, Eq height, C vert, C horiz, C width) => Transposition -> Array (Triangular lo diag up shape) a -> Full vert horiz height width a -> Full vert horiz height width a solveRight :: (Floating a, HeightOf (Triangular lo diag up shape) ~ height, Eq height, C vert, C horiz, C width) => Array (Triangular lo diag up shape) a -> Full vert horiz height width a -> Full vert horiz height width a solveLeft :: (Floating a, HeightOf (Triangular lo diag up shape) ~ width, Eq width, C vert, C horiz, C height) => Full vert horiz height width a -> Array (Triangular lo diag up shape) a -> Full vert horiz height width a | |
(vert ~ Small, horiz ~ Small, C height, height ~ width) => Solve (Full vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Divide solve :: (Floating a, HeightOf (Full vert horiz height width) ~ height0, Eq height0, C vert0, C horiz0, C width0) => Transposition -> Array (Full vert horiz height width) a -> Full0 vert0 horiz0 height0 width0 a -> Full0 vert0 horiz0 height0 width0 a solveRight :: (Floating a, HeightOf (Full vert horiz height width) ~ height0, Eq height0, C vert0, C horiz0, C width0) => Array (Full vert horiz height width) a -> Full0 vert0 horiz0 height0 width0 a -> Full0 vert0 horiz0 height0 width0 a solveLeft :: (Floating a, HeightOf (Full vert horiz height width) ~ width0, Eq width0, C vert0, C horiz0, C height0) => Full0 vert0 horiz0 height0 width0 a -> Array (Full vert horiz height width) a -> Full0 vert0 horiz0 height0 width0 a | |
(Natural sub, Natural super, vert ~ Small, horiz ~ Small, C width, C height, width ~ height) => Solve (Banded sub super vert horiz height width) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Divide solve :: (Floating a, HeightOf (Banded sub super vert horiz height width) ~ height0, Eq height0, C vert0, C horiz0, C width0) => Transposition -> Array (Banded sub super vert horiz height width) a -> Full vert0 horiz0 height0 width0 a -> Full vert0 horiz0 height0 width0 a solveRight :: (Floating a, HeightOf (Banded sub super vert horiz height width) ~ height0, Eq height0, C vert0, C horiz0, C width0) => Array (Banded sub super vert horiz height width) a -> Full vert0 horiz0 height0 width0 a -> Full vert0 horiz0 height0 width0 a solveLeft :: (Floating a, HeightOf (Banded sub super vert horiz height width) ~ width0, Eq width0, C vert0, C horiz0, C height0) => Full vert0 horiz0 height0 width0 a -> Array (Banded sub super vert horiz height width) a -> Full vert0 horiz0 height0 width0 a |
class (Solve shape, Power shape) => Inverse shape Source #
inverse
Instances
C shape => Inverse (Hermitian shape) Source # | |
(PowerContentDiag lo diag up, C shape) => Inverse (Triangular lo diag up shape) Source # | |
Defined in Numeric.LAPACK.Matrix.Plain.Divide inverse :: Floating a => Array (Triangular lo diag up shape) a -> Array (Triangular lo diag up shape) a | |
(vert ~ Small, horiz ~ Small, C height, height ~ width) => Inverse (Full vert horiz height width) Source # | |