lapack-0.4: Numerical Linear Algebra using LAPACK
Safe HaskellNone
LanguageHaskell98

Numeric.LAPACK.Matrix

Synopsis

Documentation

data family Matrix typ extraLower extraUpper lower upper meas vert horiz height width a Source #

Instances

Instances details
(Measure meas, C vert, C horiz, C height, C width, Storable a, Show height, Show width, Show a) => Show (Matrix (Array pack prop) xl xu lower upper meas vert horiz height width a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

Methods

showsPrec :: Int -> Matrix (Array pack prop) xl xu lower upper meas vert horiz height width a -> ShowS #

show :: Matrix (Array pack prop) xl xu lower upper meas vert horiz height width a -> String #

showList :: [Matrix (Array pack prop) xl xu lower upper meas vert horiz height width a] -> ShowS #

(MultiplySame typ xl xu, PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz, C height, Eq height, height ~ width, Floating a) => Semigroup (Matrix typ xl xu lower upper meas vert horiz height width a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

Methods

(<>) :: Matrix typ xl xu lower upper meas vert horiz height width a -> Matrix typ xl xu lower upper meas vert horiz height width a -> Matrix typ xl xu lower upper meas vert horiz height width a #

sconcat :: NonEmpty (Matrix typ xl xu lower upper meas vert horiz height width a) -> Matrix typ xl xu lower upper meas vert horiz height width a #

stimes :: Integral b => b -> Matrix typ xl xu lower upper meas vert horiz height width a -> Matrix typ xl xu lower upper meas vert horiz height width a #

(MultiplySame typ xl xu, StaticIdentity typ xl xu lower upper, PowerStrip lower, PowerStrip upper, meas ~ Shape, vert ~ Small, horiz ~ Small, Static height, Eq height, height ~ width, Floating a) => Monoid (Matrix typ xl xu lower upper meas vert horiz height width a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

Methods

mempty :: Matrix typ xl xu lower upper meas vert horiz height width a #

mappend :: Matrix typ xl xu lower upper meas vert horiz height width a -> Matrix typ xl xu lower upper meas vert horiz height width a -> Matrix typ xl xu lower upper meas vert horiz height width a #

mconcat :: [Matrix typ xl xu lower upper meas vert horiz height width a] -> Matrix typ xl xu lower upper meas vert horiz height width a #

(NFData typ, Measure meas, C vert, C horiz, NFData height, NFData width, NFData a) => NFData (Matrix typ xl xu lower upper meas vert horiz height width a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

Methods

rnf :: Matrix typ xl xu lower upper meas vert horiz height width a -> () #

(FormatMatrix typ, Measure meas, C vert, C horiz, C width, C height, Floating a) => Display (Matrix typ xl xu lower upper meas vert horiz height width a) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Type

Methods

display :: Matrix typ xl xu lower upper meas vert horiz height width a -> Graphic #

displayIO :: Matrix typ xl xu lower upper meas vert horiz height width a -> IO Graphic #

(FormatMatrix typ, Measure meas, C vert, C horiz, C width, C height, Floating a) => Format (Matrix typ xl xu lower upper meas vert horiz height width a) Source # 
Instance details

Defined in Numeric.LAPACK.Format

Methods

format :: Output out => String -> Matrix typ xl xu lower upper meas vert horiz height width a -> out Source #

data Matrix (Array pack prop) xl xu lower upper meas vert horiz height width a Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

data Matrix (Array pack prop) xl xu lower upper meas vert horiz height width a where
  • Array :: forall pack prop lower upper meas vert horiz height width a. OmniArray pack prop lower upper meas vert horiz height width a -> Matrix (Array pack prop) () () lower upper meas vert horiz height width a

type Full meas vert horiz height width = UnpackedMatrix Arbitrary Filled Filled meas vert horiz height width Source #

type General height width = Full Size Big Big height width Source #

type Tall height width = Full Size Big Small height width Source #

type Wide height width = Full Size Small Big height width Source #

type Square sh = SquareMeas Shape sh sh Source #

type LiberalSquare height width = SquareMeas Size height width Source #

type Quadratic typ extraLower extraUpper lower upper sh = QuadraticMeas typ extraLower extraUpper lower upper Shape sh sh Source #

type Triangular lo diag up sh = TriangularP Packed lo diag up sh Source #

type Symmetric sh = SymmetricP Packed sh Source #

type Hermitian sh = HermitianP Packed sh Source #

type HermitianPosDef sh = HermitianPosDefP Packed sh Source #

type HermitianPosSemidef sh = HermitianPosSemidefP Packed sh Source #

type FlexHermitian neg zero pos sh = FlexHermitianP Packed neg zero pos sh Source #

The definiteness tags mean:

  • neg == False: There is no x with x^T * A * x < 0.
  • zero == False: There is no x with x^T * A * x = 0.
  • pos == False: There is no x with x^T * A * x > 0.

If a tag is True then this imposes no further restriction on the matrix.

type FlexDiagonal diag size = SymmQuadratic diag U0 size Source #

type RectangularDiagonal meas vert horiz height width = Banded U0 U0 meas vert horiz height width Source #

type Banded sub super meas vert horiz height width = FlexBanded Arbitrary sub super meas vert horiz height width Source #

type BandedHermitian offDiag sh = Hermitian offDiag sh Source #

type Permutation sh = FlexPermutation Filled Filled sh Source #

class Box typ => Transpose typ Source #

Minimal complete definition

transpose

Instances

Instances details
Transpose (Array pack property) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

Methods

transpose :: (Measure meas, C vert, C horiz, C width, C height, Floating a) => Matrix (Array pack property) xl xu lower upper meas vert horiz height width a -> Matrix (Array pack property) xu xl upper lower meas horiz vert width height a Source #

transpose :: (Transpose typ, Measure meas, C vert, C horiz) => (C width, C height, Floating a) => Matrix typ xl xu lower upper meas vert horiz height width a -> Matrix typ xu xl upper lower meas horiz vert width height a Source #

adjoint :: (Transpose typ, Complex typ) => (Measure meas, C vert, C horiz) => (C height, C width, Floating a) => Matrix typ xl xu lower upper meas vert horiz height width a -> Matrix typ xu xl upper lower meas horiz vert width height a Source #

height :: (Box typ, Measure meas, C vert, C horiz) => Matrix typ xl xu lower upper meas vert horiz height width a -> height Source #

width :: (Box typ, Measure meas, C vert, C horiz) => Matrix typ xl xu lower upper meas vert horiz height width a -> width Source #

class Box typ Source #

Minimal complete definition

extent

Instances

Instances details
Box (Array pack property) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

Methods

extent :: (Measure meas, C vert, C horiz) => Matrix (Array pack property) xl xu lower upper meas vert horiz height width a -> Extent meas vert horiz height width

height :: (Measure meas, C vert, C horiz) => Matrix (Array pack property) xl xu lower upper meas vert horiz height width a -> height Source #

width :: (Measure meas, C vert, C horiz) => Matrix (Array pack property) xl xu lower upper meas vert horiz height width a -> width Source #

indices :: (Box typ, Measure meas, C vert, C horiz) => (Indexed height, Indexed width) => Matrix typ xl xu lower upper meas vert horiz height width a -> [(Index height, Index width)] Source #

reshape :: (Measure measA, C vertA, C horizA) => (Measure measB, C vertB, C horizB) => (C heightA, C widthA) => (C heightB, C widthB) => Omni packB propB lowerB upperB measB vertB horizB heightB widthB -> ArrayMatrix packA propA lowerA upperA measA vertA horizA heightA widthA a -> ArrayMatrix packB propB lowerB upperB measB vertB horizB heightB widthB a Source #

mapShape :: (Measure measA, C vertA, C horizA) => (Measure measB, C vertB, C horizB) => (C heightA, C widthA) => (C heightB, C widthB) => (Omni packA propA lowerA upperA measA vertA horizA heightA widthA -> Omni packB propB lowerB upperB measB vertB horizB heightB widthB) -> ArrayMatrix packA propA lowerA upperA measA vertA horizA heightA widthA a -> ArrayMatrix packB propB lowerB upperB measB vertB horizB heightB widthB a Source #

caseTallWide :: (Measure meas, C vert, C horiz, C height, C width) => Full meas 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 :: (MapExtent typ xl xu lower upper, Measure measA, C vertA, C horizA) => (Measure measB, C vertB, C horizB) => Map measA vertA horizA measB vertB horizB height width -> Matrix typ xl xu lower upper measA vertA horizA height width a -> Matrix typ xl xu lower upper measB vertB horizB height width a Source #

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

toFull :: (Measure meas, C vert, C horiz) => (C height, C width, Floating a) => ArrayMatrix pack property lower upper meas vert horiz height width a -> Full meas vert horiz height width a Source #

unpack :: (Measure meas, C vert, C horiz) => (C height, C width, Floating a) => ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix Unpacked property lower upper meas vert horiz height width a Source #

asGeneral :: Id (General height width a) Source #

asTall :: Id (Tall height width a) Source #

asWide :: Id (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 :: (Measure meas, C vert, C horiz) => Full meas vert Small height width a -> Full Size vert horiz height width a Source #

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

mapHeight :: (MapSize typ, C vert, C horiz, C heightA, C heightB, C width) => (heightA -> heightB) -> Matrix typ extraLower extraUpper lower upper Size vert horiz heightA width a -> Matrix typ extraLower extraUpper lower upper Size vert horiz heightB width a Source #

The number of rows and columns must be maintained by the shape mapping function.

mapWidth :: (MapSize typ, C vert, C horiz, C height, C widthA, C widthB) => (widthA -> widthB) -> Matrix typ extraLower extraUpper lower upper Size vert horiz height widthA a -> Matrix typ extraLower extraUpper lower upper Size vert horiz height widthB a Source #

mapSquareSize :: (SquareShape typ, C shA, C shB) => (shA -> shB) -> Quadratic typ xl xu lower upper shA a -> Quadratic typ xl xu lower upper shB a Source #

The number of rows and columns must be maintained by the shape mapping function.

identity :: (Quadratic pack property lower upper, C sh, Floating a) => Order -> sh -> Quadratic pack property lower upper sh a Source #

diagonal :: (Diagonal property, Quadratic pack property lower upper, C sh, Floating a) => Order -> Vector sh a -> Quadratic pack property lower upper 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 :: (Measure meas, C vert, C horiz, C height, C width, Floating a) => Full meas vert horiz height width a -> [Vector width a] Source #

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

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

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

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

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

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

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

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

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

takeEqually :: (Measure meas, C vert, C horiz, Floating a) => Int -> Full meas vert horiz ShapeInt ShapeInt a -> Full meas 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 Size vert Big ShapeInt width a -> Full Size vert Big ShapeInt width a Source #

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

dropEqually :: (Measure meas, C vert, C horiz, Floating a) => Int -> Full meas vert horiz ShapeInt ShapeInt a -> Full meas 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 Size vert Big (height0 ::+ height1) width a -> Full Size vert Big height0 width a Source #

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

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

takeRight :: (C vert, C height, C width0, C width1, Floating a) => Full Size Big vert height (width0 ::+ width1) a -> Full Size 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 :: (Measure meas, C vert, C horiz, Indexed height, C width, Floating a) => Index height -> Index height -> Full meas vert horiz height width a -> Full meas vert horiz height width a Source #

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

reverseRows :: (Measure meas, C vert, C horiz, Permutable height, C width, Floating a) => Full meas vert horiz height width a -> Full meas vert horiz height width a Source #

reverseColumns :: (Measure meas, C vert, C horiz, C height, Permutable width, Floating a) => Full meas vert horiz height width a -> Full meas vert horiz height width a Source #

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

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

forceOrder :: (Measure meas, C vert, C horiz) => (C height, C width, Floating a) => Order -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a Source #

adaptOrder :: (Measure meas, C vert, C horiz) => (C height, C width, Floating a) => ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width 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 Size vertA Big height widthA a -> Full Size vertB Big height widthB a -> Full Size 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 Size vertA Big height widthA a -> Full Size vertB Big height widthB a -> Full Size 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 Size Big horizA heightA width a -> Full Size Big horizB heightB width a -> Full Size 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 Size Big horizA heightA width a -> Full Size Big horizB heightB width a -> Full Size Big horizC (heightA ::+ heightB) width a Source #

stack :: (Measure meas, C vert, C horiz, C heightA, Eq heightA, C heightB, Eq heightB, C widthA, Eq widthA, C widthB, Eq widthB, Floating a) => Full meas vert horiz heightA widthA a -> General heightA widthB a -> General heightB widthA a -> Full meas vert horiz heightB widthB a -> Full meas vert horiz (heightA ::+ heightB) (widthA ::+ widthB) 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 :: (Measure meas, C vert, C horiz, C heightA, C widthA, C heightB, C widthB, Floating a) => Full meas vert horiz heightA widthA a -> Full meas vert horiz heightB widthB a -> Full meas 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 :: (Measure meas, C vert, C horiz, C height, C width, Storable a, Storable b) => (a -> b) -> Full meas vert horiz height width a -> Full meas vert horiz height width b Source #

class Complex typ Source #

Minimal complete definition

conjugate, fromReal, toComplex

Instances

Instances details
Complex (Array pack property) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Class

Methods

conjugate :: (Matrix (Array pack property) xl xu lower upper meas vert horiz height width ~ matrix, Measure meas, C vert, C horiz, C height, C width, Floating a) => matrix a -> matrix a Source #

fromReal :: (Matrix (Array pack property) xl xu lower upper meas vert horiz height width ~ matrix, Measure meas, C vert, C horiz, C height, C width, Floating a) => matrix (RealOf a) -> matrix a Source #

toComplex :: (Matrix (Array pack property) xl xu lower upper meas vert horiz height width ~ matrix, Measure meas, C vert, C horiz, C height, C width, Floating a) => matrix a -> matrix (ComplexOf a) Source #

conjugate :: (Complex typ, Matrix typ xl xu lower upper meas vert horiz height width ~ matrix, Measure meas, C vert, C horiz, C height, C width, Floating a) => matrix a -> matrix a Source #

fromReal :: (Complex typ, Matrix typ xl xu lower upper meas vert horiz height width ~ matrix, Measure meas, C vert, C horiz, C height, C width, Floating a) => matrix (RealOf a) -> matrix a Source #

toComplex :: (Complex typ, Matrix typ xl xu lower upper meas vert horiz height width ~ matrix, Measure meas, C vert, C horiz, C height, C width, Floating a) => matrix a -> matrix (ComplexOf a) Source #

class Box typ => SquareShape typ Source #

Minimal complete definition

toSquare, takeDiagonal, mapSquareSize, identityFrom

Instances

Instances details
SquareShape (Array pack property) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Class

Methods

toSquare :: (C sh, Floating a) => Quadratic (Array pack property) xl xu lower upper sh a -> Square sh a Source #

takeDiagonal :: (C sh, Floating a) => Quadratic (Array pack property) xl xu lower upper sh a -> Vector sh a Source #

mapSquareSize :: (C shA, C shB) => (shA -> shB) -> Quadratic (Array pack property) xl xu lower upper shA a -> Quadratic (Array pack property) xl xu lower upper shB a Source #

identityFrom :: (C sh, Floating a) => Quadratic (Array pack property) xl xu lower upper sh a -> Quadratic (Array pack property) xl xu lower upper sh a Source #

toSquare :: (SquareShape typ, C sh, Floating a) => Quadratic typ xl xu lower upper sh a -> Square sh a Source #

identityFromShape :: (C sh, Floating a) => Quadratic pack property lower upper sh -> Quadratic pack property lower upper sh a Source #

identityFrom :: (SquareShape typ, C sh, Floating a) => Quadratic typ xl xu lower upper sh a -> Quadratic typ xl xu lower upper sh a Source #

takeDiagonal :: (SquareShape typ, C sh, Floating a) => Quadratic typ xl xu lower upper sh a -> Vector sh a Source #

trace :: (SquareShape typ, C sh, Floating a) => Quadratic typ xl xu lower upper sh a -> a Source #

type family RealOf x Source #

Instances

Instances details
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 :: (Measure meas, C vert, C horiz, C height, C width, Floating a) => Full meas vert horiz height width a -> Vector height a Source #

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

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

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

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

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

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

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

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

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

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

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

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

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

class Box typ => ToQuadratic typ Source #

Minimal complete definition

heightToQuadratic, widthToQuadratic

Instances

Instances details
ToQuadratic (Array pack property) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Array

Methods

heightToQuadratic :: Measure meas => QuadraticMeas (Array pack property) xl xu lower upper meas height width a -> Quadratic (Array pack property) xl xu lower upper height a

widthToQuadratic :: Measure meas => QuadraticMeas (Array pack property) xl xu lower upper meas height width a -> Quadratic (Array pack property) xl xu lower upper width a

zero :: Homogeneous property => (Measure meas, C vert, C horiz) => (C height, C width, Floating a) => Omni pack property lower upper meas vert horiz height width -> ArrayMatrix pack property lower upper meas vert horiz height width a Source #

negate :: Homogeneous property => (Measure meas, C vert, C horiz) => (C height, C width, Floating a) => ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a Source #

scale :: (Measure meas, C vert, C horiz) => (Scale property, C height, C width, Floating a) => a -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a Source #

scaleReal :: Homogeneous property => (Measure meas, C vert, C horiz) => (C height, C width, Floating a) => RealOf a -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a Source #

scaleRealReal :: Homogeneous property => (Measure meas, C vert, C horiz) => (C height, C width, Real a) => a -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a Source #

(.*#) :: (Measure meas, C vert, C horiz) => (Scale property, C height, C width, Floating a) => a -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a infixl 7 Source #

add :: (Measure meas, C vert, C horiz) => (Additive property, C height, Eq height, C width, Eq width, Floating a) => ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a infixl 6 Source #

sub :: (Measure meas, C vert, C horiz) => (Subtractive property, C height, Eq height, C width, Eq width, Floating a) => ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a infixl 6 Source #

(#+#) :: (Measure meas, C vert, C horiz) => (Additive property, C height, Eq height, C width, Eq width, Floating a) => ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a infixl 6 Source #

(#-#) :: (Measure meas, C vert, C horiz) => (Subtractive property, C height, Eq height, C width, Eq width, Floating a) => ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a -> ArrayMatrix pack property lower upper meas vert horiz height width a infixl 6 Source #

class (Box typA, Box typB) => Multiply typA xlA xuA typB xlB xuB lowerC upperC measC Source #

Minimal complete definition

matrixMatrix

Instances

Instances details
(Packing packA, Property propertyA, xlA ~ (), xuA ~ (), Packing packB, Property propertyB, xlB ~ (), xuB ~ (), Packing packC, Property propertyC, MultipliedPacking packA packB ~ pack, MultipliedPacking packB packA ~ pack, MultipliedProperty propertyA propertyB ~ propertyAB, MultipliedProperty propertyB propertyA ~ propertyAB, UnitIfTriangular lowerC upperC ~ diag, UnitIfTriangular upperC lowerC ~ diag, PackingByStrip lowerC upperC measC pack ~ packC, PackingByStrip upperC lowerC measC pack ~ packC, MergeUnit propertyAB diag ~ propertyC, MergeUnit diag propertyAB ~ propertyC) => Multiply (Array packA propertyA) xlA xuA (Array packB propertyB) xlB xuB lowerC upperC measC Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Associated Types

type Multiplied (Array packA propertyA) xlA xuA (Array packB propertyB) xlB xuB lowerC upperC measC

type MultipliedExtra (Array packA propertyA) xlA xuA (Array packB propertyB) xlB xuB

Methods

matrixMatrix :: (Box (Array packA propertyA), Strip lowerA, Strip upperA, Box (Array packB propertyB), Strip lowerB, Strip upperB, Box typC, Strip lowerC, Strip upperC, Multiplied (Array packA propertyA) xlA xuA (Array packB propertyB) xlB xuB lowerC upperC measC ~ typC, MultipliedExtra (Array packA propertyA) xlA xuA (Array packB propertyB) xlB xuB ~ xlC, MultipliedExtra (Array packA propertyA) xuA xlA (Array packB propertyB) xuB xlB ~ xuC, MultipliedStrip lowerA lowerB ~ lowerC, MultipliedStrip lowerB lowerA ~ lowerC, MultipliedStrip upperA upperB ~ upperC, MultipliedStrip upperB upperA ~ upperC, MultipliedBands lowerA lowerB ~ lowerC, MultipliedBands lowerB lowerA ~ lowerC, MultipliedBands upperA upperB ~ upperC, MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA, C horizA, Measure measB, C vertB, C horizB, MultiplyMeasure measA measB ~ measC, MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC, Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC, Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse, C width, Floating a) => Matrix (Array packA propertyA) xlA xuA lowerA upperA measA vertA horizA height fuse a -> Matrix (Array packB propertyB) xlB xuB lowerB upperB measB vertB horizB fuse width a -> Matrix typC xlC xuC lowerC upperC measC vertC horizC height width a

(#*#) :: (Box typA, Strip lowerA, Strip upperA) => (Box typB, Strip lowerB, Strip upperB) => (Box typC, Strip lowerC, Strip upperC) => Multiply typA xlA xuA typB xlB xuB lowerC upperC measC => Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC => MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC => MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC => MultipliedStrip lowerA lowerB ~ lowerC => MultipliedStrip lowerB lowerA ~ lowerC => MultipliedStrip upperA upperB ~ upperC => MultipliedStrip upperB upperA ~ upperC => MultipliedBands lowerA lowerB ~ lowerC => MultipliedBands lowerB lowerA ~ lowerC => MultipliedBands upperA upperB ~ upperC => MultipliedBands upperB upperA ~ upperC => (Measure measA, C vertA, C horizA) => (Measure measB, C vertB, C horizB) => MultiplyMeasure measA measB ~ measC => MultiplyMeasure measB measA ~ measC => Multiply vertA vertB ~ vertC => Multiply vertB vertA ~ vertC => Multiply horizA horizB ~ horizC => Multiply horizB horizA ~ horizC => (C height, C fuse, Eq fuse, C width) => Floating a => Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a -> Matrix typB xlB xuB lowerB upperB measB vertB horizB fuse width a -> Matrix typC xlC xuC lowerC upperC measC vertC horizC height width a infixl 7 Source #

class Box typ => MultiplyVector typ xl xu Source #

Minimal complete definition

matrixVector, vectorMatrix

Instances

Instances details
(Packing pack, Property property, xl ~ (), xu ~ ()) => MultiplyVector (Array pack property) xl xu Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Methods

matrixVector :: (Strip lower, Strip upper, Measure meas, C vert, C horiz, C height, C width, Eq width, Floating a) => Matrix (Array pack property) xl xu lower upper meas vert horiz height width a -> Vector width a -> Vector height a

vectorMatrix :: (Strip lower, Strip upper, Measure meas, C vert, C horiz, C height, C width, Eq height, Floating a) => Vector height a -> Matrix (Array pack property) xl xu lower upper meas vert horiz height width a -> Vector width a

(#*|) :: (MultiplyVector typ xl xu, Strip lower, Strip upper) => (Measure meas, C vert, C horiz, C height, C width, Eq width, Floating a) => Matrix typ xl xu lower upper meas vert horiz height width a -> Vector width a -> Vector height a infixr 7 Source #

(-*#) :: (MultiplyVector typ xl xu, Strip lower, Strip upper) => (Measure meas, C vert, C horiz, C height, C width, Eq height, Floating a) => Vector height a -> Matrix typ xl xu lower upper meas vert horiz height width a -> Vector width a infixl 7 Source #

class Box typ => MultiplySquare typ xl xu Source #

Minimal complete definition

transposableSquare | fullSquare, squareFull

Instances

Instances details
(Packing pack, Property property, xl ~ (), xu ~ ()) => MultiplySquare (Array pack property) xl xu Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Methods

transposableSquare :: (Strip lower, Strip upper, Measure meas, C vert, C horiz, C height, Eq height, C width, Floating a) => Transposition -> Quadratic (Array pack property) xl xu lower upper height a -> Full meas vert horiz height width a -> Full meas vert horiz height width a

squareFull :: (Strip lower, Strip upper, Measure meas, C vert, C horiz, C height, Eq height, C width, Floating a) => Quadratic (Array pack property) xl xu lower upper height a -> Full meas vert horiz height width a -> Full meas vert horiz height width a

fullSquare :: (Strip lower, Strip upper, Measure meas, C vert, C horiz, C height, C width, Eq width, Floating a) => Full meas vert horiz height width a -> Quadratic (Array pack property) xl xu lower upper width a -> Full meas vert horiz height width a

multiplySquare :: MultiplySquare typ xl xu => (Strip lower, Strip upper) => (Measure meas, C vert, C horiz, C height, Eq height, C width, Floating a) => Transposition -> Quadratic typ xl xu lower upper height a -> Full meas vert horiz height width a -> Full meas vert horiz height width a Source #

class Box typ => Power typ xl xu Source #

Minimal complete definition

square, power, powers1

Instances

Instances details
(Packing pack, Property property, xl ~ (), xu ~ ()) => Power (Array pack property) xl xu Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Multiply

Methods

square :: (PowerStrip lower, PowerStrip upper, C sh, Floating a) => Quadratic (Array pack property) xl xu lower upper sh a -> Quadratic (Array pack property) xl xu lower upper sh a Source #

power :: (PowerStrip lower, PowerStrip upper, C sh, Floating a) => Integer -> Quadratic (Array pack property) xl xu lower upper sh a -> Quadratic (Array pack property) xl xu lower upper sh a Source #

powers1 :: (PowerStrip lower, PowerStrip upper, C sh, Floating a) => Quadratic (Array pack property) xl xu lower upper sh a -> Stream (Quadratic (Array pack property) xl xu lower upper sh a) Source #

square :: (Power typ xl xu, PowerStrip lower, PowerStrip upper) => (C sh, Floating a) => Quadratic typ xl xu lower upper sh a -> Quadratic typ xl xu lower upper sh a Source #

power :: (Power typ xl xu, PowerStrip lower, PowerStrip upper) => (C sh, Floating a) => Integer -> Quadratic typ xl xu lower upper sh a -> Quadratic typ xl xu lower upper sh a Source #

powers :: (Power typ xl xu, SquareShape typ) => (PowerStrip lower, PowerStrip upper) => (C sh, Floating a) => Quadratic typ xl xu lower upper sh a -> Stream (Quadratic typ xl xu lower upper sh a) Source #

powers1 :: (Power typ xl xu, PowerStrip lower, PowerStrip upper) => (C sh, Floating a) => Quadratic typ xl xu lower upper sh a -> Stream (Quadratic typ xl xu lower upper sh a) Source #

(##*#) :: (MultiplySquare typ xl xu, ToQuadratic typ) => (Strip lowerA, Strip upperA) => (Strip lowerB, Strip upperB) => (Strip lowerC, Strip upperC) => MultipliedBands lowerA lowerB ~ lowerC => MultipliedBands lowerB lowerA ~ lowerC => MultipliedBands upperA upperB ~ upperC => MultipliedBands upperB upperA ~ upperC => (Measure measA, Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC) => (C vert, C horiz) => (C height, C fuse, Eq fuse, C width, Floating a) => Unpacked lowerB upperB measB vert horiz height fuse a -> QuadraticMeas typ xl xu lowerA upperA measA fuse width a -> Unpacked lowerC upperC measC vert horiz height width a infixl 7 Source #

(#*##) :: (MultiplySquare typ xl xu, ToQuadratic typ) => (Strip lowerA, Strip upperA) => (Strip lowerB, Strip upperB) => (Strip lowerC, Strip upperC) => MultipliedBands lowerA lowerB ~ lowerC => MultipliedBands lowerB lowerA ~ lowerC => MultipliedBands upperA upperB ~ upperC => MultipliedBands upperB upperA ~ upperC => (Measure measA, Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC) => (C vert, C horiz) => (C height, C fuse, Eq fuse, C width, Floating a) => QuadraticMeas typ xl xu lowerA upperA measA height fuse a -> Unpacked lowerB upperB measB vert horiz fuse width a -> Unpacked lowerC upperC measC vert horiz height width a infixr 7 Source #

class Box typ => Indexed typ Source #

Minimal complete definition

(#!)

Instances

Instances details
Indexed (Array pack property) Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Indexed

Methods

(#!) :: (Measure meas, C vert, C horiz, Indexed height, Indexed width, Floating a) => Matrix (Array pack property) xl xu lower upper meas vert horiz height width a -> (Index height, Index width) -> a Source #

(#!) :: (Indexed typ, Measure meas, C vert, C horiz, Indexed height, Indexed width, Floating a) => Matrix typ xl xu lower upper meas vert horiz height width a -> (Index height, Index width) -> a infixl 9 Source #

class Box typ => Determinant typ xl xu Source #

Minimal complete definition

determinant

Instances

Instances details
(Packing pack, Property property, xl ~ (), xu ~ ()) => Determinant (Array pack property) xl xu Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Divide

Methods

determinant :: (Strip lower, Strip upper, C sh, Floating a) => Quadratic (Array pack property) xl xu lower upper sh a -> a Source #

determinant :: (Determinant typ xl xu, Strip lower, Strip upper) => (C sh, Floating a) => Quadratic typ xl xu lower upper sh a -> a Source #

class Box typ => Solve typ xl xu Source #

Minimal complete definition

solve | solveLeft, solveRight

Instances

Instances details
(Packing pack, Property property, xl ~ (), xu ~ ()) => Solve (Array pack property) xl xu Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Divide

Methods

solve :: (Strip lower, Strip upper, Measure meas, C vert, C horiz, C height, C width, Eq height, Floating a) => Transposition -> Quadratic (Array pack property) xl xu lower upper height a -> Full meas vert horiz height width a -> Full meas vert horiz height width a Source #

solveRight :: (Strip lower, Strip upper, Measure meas, C vert, C horiz, C height, C width, Eq height, Floating a) => Quadratic (Array pack property) xl xu lower upper height a -> Full meas vert horiz height width a -> Full meas vert horiz height width a Source #

solveLeft :: (Strip lower, Strip upper, Measure meas, C vert, C horiz, C height, C width, Eq width, Floating a) => Full meas vert horiz height width a -> Quadratic (Array pack property) xl xu lower upper width a -> Full meas vert horiz height width a Source #

solve :: (Solve typ xl xu, Strip lower, Strip upper) => (Measure meas, C vert, C horiz) => (C height, C width, Eq height, Floating a) => Transposition -> Quadratic typ xl xu lower upper height a -> Full meas vert horiz height width a -> Full meas vert horiz height width a Source #

solveLeft :: (Solve typ xl xu, Strip lower, Strip upper) => (Measure meas, C vert, C horiz) => (C height, C width, Eq width, Floating a) => Full meas vert horiz height width a -> Quadratic typ xl xu lower upper width a -> Full meas vert horiz height width a Source #

solveRight :: (Solve typ xl xu, Strip lower, Strip upper) => (Measure meas, C vert, C horiz) => (C height, C width, Eq height, Floating a) => Quadratic typ xl xu lower upper height a -> Full meas vert horiz height width a -> Full meas vert horiz height width a Source #

(##/#) :: (Solve typ xl xu, ToQuadratic typ, Strip lower, Strip upper, C height, C width, Eq width, C nrhs, Measure measA, Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC, C vert, C horiz, Floating a) => Full measB vert horiz nrhs width a -> QuadraticMeas typ xl xu lower upper measA height width a -> Full measC vert horiz nrhs height a infixl 7 Source #

(#\##) :: (Solve typ xl xu, ToQuadratic typ, Strip lower, Strip upper, C height, Eq height, C width, C nrhs, Measure measA, Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC, C vert, C horiz, Floating a) => QuadraticMeas typ xl xu lower upper measA height width a -> Full measB vert horiz height nrhs a -> Full measC vert horiz width nrhs a infixr 7 Source #

solveVector :: (Solve typ xl xu, Strip lower, Strip upper, C sh, Eq sh, Floating a) => Transposition -> Quadratic typ xl xu lower upper sh a -> Vector sh a -> Vector sh a Source #

(-/#) :: (Solve typ xl xu, ToQuadratic typ, Strip lower, Strip upper, Measure meas, C height, C width, Eq width, Floating a) => Vector width a -> QuadraticMeas typ xl xu lower upper meas height width a -> Vector height a infixl 7 Source #

(#\|) :: (Solve typ xl xu, ToQuadratic typ, Strip lower, Strip upper, Measure meas, C height, C width, Eq height, Floating a) => QuadraticMeas typ xl xu lower upper meas height width a -> Vector height a -> Vector width a infixr 7 Source #

class Solve typ xl xu => Inverse typ xl xu Source #

Minimal complete definition

inverse

Instances

Instances details
(Packing pack, Property property, xl ~ (), xu ~ ()) => Inverse (Array pack property) xl xu Source # 
Instance details

Defined in Numeric.LAPACK.Matrix.Divide

Methods

inverse :: (PowerStrip lower, PowerStrip upper, Measure meas, C height, C width, Floating a) => QuadraticMeas (Array pack property) xl xu lower upper meas height width a -> QuadraticMeas (Array pack property) xl xu lower upper meas width height a Source #

inverse :: (Inverse typ xl xu, PowerStrip lower, PowerStrip upper, Measure meas, C height, C width, Floating a) => QuadraticMeas typ xl xu lower upper meas height width a -> QuadraticMeas typ xl xu lower upper meas width height a Source #

data Transposition Source #

Constructors

NonTransposed 
Transposed 

Instances

Instances details
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