lapack-0.3: Numerical Linear Algebra using LAPACK

Safe HaskellNone

Numeric.LAPACK.Matrix.Shape

Synopsis

Documentation

type General height width = Full Big Big height widthSource

type Tall height width = Full Big Small height widthSource

type Wide height width = Full Small Big height widthSource

type Square size = Full Small Small size sizeSource

data Full vert horiz height width Source

Constructors

Full 

Fields

fullOrder :: Order
 
fullExtent :: Extent vert horiz height width
 

Instances

(C vert, C horiz, C size, ~ * size height, Eq height, C width) => Multiply (Hermitian size) (Full vert horiz height width) 
(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) 
(Eq height, Eq width, C vert, C horiz) => Eq (Full vert horiz height width) 
(Show height, Show width, C vert, C horiz) => Show (Full vert horiz height width) 
(C vert, C horiz, C height, C width) => C (Full vert horiz height width) 
(C vert, C horiz, Indexed height, Indexed width) => Indexed (Full vert horiz height width) 
(C vert, C horiz, InvIndexed height, InvIndexed width) => InvIndexed (Full vert horiz height width) 
(C vert, C horiz, NFData height, NFData width) => NFData (Full vert horiz height width) 
(C vert, C horiz, C height, C width) => Box (Full vert horiz height width) 
(C vert, C horiz, C height, C width) => FormatArray (Full vert horiz height width) 
(~ * Small vert, ~ * Small horiz, C height, ~ * height width) => SquareShape (Full vert horiz height width) 
(C vert, C horiz, C height, Eq height, C width, Eq width) => Additive (Full vert horiz height width) 
(C vert, C horiz, C height, C width) => ShapeOrder (Full vert horiz height width) 
(C vert, C horiz, C height, C width) => Homogeneous (Full vert horiz height width) 
(C vert, C horiz, C height, C width) => Complex (Full vert horiz height width) 
(C vert, C horiz, C height, C width) => Admissible (Full vert horiz height width) 
(C vert, C horiz, C height, Eq height, ~ * height width) => MultiplySame (Full vert horiz height width) 
(~ * Small vert, ~ * Small horiz, C height, ~ * height width) => Power (Full vert horiz height width) 
(~ * vert Small, ~ * horiz Small, C height, ~ * height width) => MultiplySquare (Full vert horiz height width) 
(C vert, C horiz, C width, C height) => MultiplyVector (Full vert horiz height width) 
(C vert, C horiz, C height, C width) => Scale (Full vert horiz height width) 
(~ * vert Small, ~ * horiz Small, C height, ~ * height width) => Inverse (Full vert horiz height width) 
(~ * vert Small, ~ * horiz Small, C height, ~ * height width) => Solve (Full vert horiz height width) 
(~ * vert Small, ~ * horiz Small, C height, ~ * height width) => Determinant (Full vert horiz height width) 
(C vert, C horiz, Indexed height, Indexed width) => Indexed (Full vert horiz height width) 
(C vert, C horiz, C size, ~ * size width, Eq width, C height) => Multiply (Full vert horiz height width) (Hermitian size) 
(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) 
(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) 
(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) 
(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) 
(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) 
(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) 

fullHeight :: (C vert, C horiz) => Full vert horiz height width -> heightSource

fullWidth :: (C vert, C horiz) => Full vert horiz height width -> widthSource

data Order Source

Constructors

RowMajor 
ColumnMajor 

Instances

general :: Order -> height -> width -> General height widthSource

square :: Order -> sh -> Square shSource

wide :: (C height, C width) => Order -> height -> width -> Wide height widthSource

tall :: (C height, C width) => Order -> height -> width -> Tall height widthSource

data Split lower vert horiz height width Source

Instances

(Eq lower, Eq height, Eq width, C vert, C horiz) => Eq (Split lower vert horiz height width) 
(Show lower, Show height, Show width, C vert, C horiz) => Show (Split lower vert horiz height width) 
(Eq lower, C vert, C horiz, C height, C width) => C (Split lower vert horiz height width) 
(Eq lower, C vert, C horiz, Indexed height, Indexed width) => Indexed (Split lower vert horiz height width) 
(Eq lower, C vert, C horiz, InvIndexed height, InvIndexed width) => InvIndexed (Split lower vert horiz height width) 
(NFData lower, C vert, C horiz, NFData height, NFData width) => NFData (Split lower vert horiz height width) 
(Eq lower, C vert, C horiz, C height, C width) => Box (Split lower vert horiz height width) 
(Eq lower, C vert, C horiz, C height, C width) => FormatArray (Split lower vert horiz height width) 

type SplitGeneral lower height width = Split lower Big Big height widthSource

splitGeneral :: lower -> Order -> height -> width -> SplitGeneral lower height widthSource

splitFromFull :: lower -> Full vert horiz height width -> Split lower vert horiz height widthSource

data Hermitian size Source

Store the upper triangular half of a real symmetric or complex Hermitian matrix.

Constructors

Hermitian 

Fields

hermitianOrder :: Order
 
hermitianSize :: size
 

Instances

Eq size => Eq (Hermitian size) 
Show size => Show (Hermitian size) 
C size => C (Hermitian size) 
Indexed size => Indexed (Hermitian size) 
InvIndexed size => InvIndexed (Hermitian size) 
NFData size => NFData (Hermitian size) 
C size => Box (Hermitian size) 
C size => FormatArray (Hermitian size) 
C size => SquareShape (Hermitian size) 
(C size, Eq size) => Additive (Hermitian size) 
C size => ShapeOrder (Hermitian size) 
C size => Homogeneous (Hermitian size) 
C size => Complex (Hermitian size) 
C size => Admissible (Hermitian size) 
C size => Power (Hermitian size) 
C shape => MultiplySquare (Hermitian shape) 
C shape => MultiplyVector (Hermitian shape) 
C shape => Inverse (Hermitian shape) 
C shape => Solve (Hermitian shape) 
C shape => Determinant (Hermitian shape) 
Indexed size => Indexed (Hermitian size) 
(C shapeA, ~ * shapeA shapeB, Eq shapeB) => Multiply (Hermitian shapeA) (Hermitian shapeB) 
(C vert, C horiz, C size, ~ * size height, Eq height, C width) => Multiply (Hermitian size) (Full vert horiz height width) 
(C vert, C horiz, C size, ~ * size width, Eq width, C height) => Multiply (Full vert horiz height width) (Hermitian size) 

hermitian :: Order -> size -> Hermitian sizeSource

data Triangular lo diag up size Source

Constructors

Triangular 

Fields

triangularDiag :: diag
 
triangularUplo :: (lo, up)
 
triangularOrder :: Order
 
triangularSize :: size
 

Instances

(Eq lo, Eq diag, Eq up, Eq size) => Eq (Triangular lo diag up size) 
(Show lo, Show diag, Show up, Show size) => Show (Triangular lo diag up size) 
(Content lo, TriDiag diag, Content up, C size) => C (Triangular lo diag up size) 
(Content lo, TriDiag diag, Content up, Indexed size) => Indexed (Triangular lo diag up size) 
(Content lo, TriDiag diag, Content up, InvIndexed size) => InvIndexed (Triangular lo diag up size) 
(Content lo, TriDiag diag, Content up, NFData size) => NFData (Triangular lo diag up size) 
(Content lo, TriDiag diag, Content up, C size) => Box (Triangular lo diag up size) 
(Content lo, Content up, TriDiag diag, C size) => FormatArray (Triangular lo diag up size) 
(Content lo, TriDiag diag, Content up, C size) => SquareShape (Triangular lo diag up size) 
(Content lo, Eq lo, ~ * NonUnit diag, Content up, Eq up, C size, Eq size) => Additive (Triangular lo diag up size) 
(Content lo, TriDiag diag, Content up, C size) => ShapeOrder (Triangular lo diag up size) 
(Content lo, ~ * NonUnit diag, Content up, C size) => Homogeneous (Triangular lo diag up size) 
(Content lo, TriDiag diag, Content up, C size) => Complex (Triangular lo diag up size) 
(Content lo, TriDiag diag, Content up, C size) => Admissible (Triangular lo diag up size) 
(DiagUpLo lo up, TriDiag diag, C size, Eq size) => MultiplySame (Triangular lo diag up size) 
(PowerContentDiag lo diag up, C size) => Power (Triangular lo diag up size) 
(Content lo, Content up, TriDiag diag, C shape) => MultiplySquare (Triangular lo diag up shape) 
(Content lo, Content up, TriDiag diag, C shape) => MultiplyVector (Triangular lo diag up shape) 
(Content lo, Content up, ~ * diag NonUnit, C size) => Scale (Triangular lo diag up size) 
(PowerContentDiag lo diag up, C shape) => Inverse (Triangular lo diag up shape) 
(Content lo, Content up, TriDiag diag, C shape) => Solve (Triangular lo diag up shape) 
(Content lo, Content up, TriDiag diag, C shape) => Determinant (Triangular lo diag up shape) 
(Content lo, TriDiag diag, Content up, Indexed size) => Indexed (Triangular lo diag up size) 
(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) 
(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) 
(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) 

type Identity = Triangular Empty Unit EmptySource

type Diagonal = Triangular Empty NonUnit EmptySource

type LowerTriangular diag = Triangular Filled diag EmptySource

type UpperTriangular diag = Triangular Empty diag FilledSource

type Symmetric = FlexSymmetric NonUnitSource

diagonal :: Order -> size -> Triangular Empty NonUnit Empty sizeSource

symmetric :: Order -> size -> Symmetric sizeSource

autoDiag :: TriDiag diag => diagSource

autoUplo :: (Content lo, Content up) => (lo, up)Source

type DiagUpLo lo up = (DiagUpLoC lo up, DiagUpLoC up lo)Source

switchDiagUpLo :: DiagUpLoC lo up => f Empty Empty -> f Empty Filled -> f Filled Empty -> f lo upSource

switchDiagUpLoSym :: (Content lo, Content up) => f Empty Empty -> f Empty Filled -> f Filled Empty -> f Filled Filled -> f lo upSource

class TriDiag diag whereSource

Methods

switchTriDiag :: f Unit -> f NonUnit -> f diagSource

data Unit Source

Constructors

Unit 

Instances

data NonUnit Source

Constructors

NonUnit 

data Banded sub super vert horiz height width Source

Constructors

Banded 

Fields

bandedOffDiagonals :: (UnaryProxy sub, UnaryProxy super)
 
bandedOrder :: Order
 
bandedExtent :: Extent vert horiz height width
 

Instances

(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) 
(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) 
(Eq height, Eq width, C vert, C horiz) => Eq (Banded sub super vert horiz height width) 
(Show height, Show width, Natural sub, Natural super, C vert, C horiz) => Show (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, C height, C width) => C (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, Indexed height, Indexed width) => Indexed (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, InvIndexed height, InvIndexed width) => InvIndexed (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, NFData height, NFData width) => NFData (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, C height, C width) => Box (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, C height, C width) => FormatArray (Banded sub super vert horiz height width) 
(Natural sub, Natural super, ~ * Small vert, ~ * Small horiz, C height, ~ * height width) => SquareShape (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, C height, C width) => Homogeneous (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, C height, C width) => Complex (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, C height, C width) => Admissible (Banded sub super vert horiz height width) 
(Natural sub, Natural super, ~ * vert Small, ~ * horiz Small, C height, ~ * height width) => MultiplySquare (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, C height, C width) => MultiplyVector (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, C height, C width) => Scale (Banded sub super vert horiz height width) 
(Natural sub, Natural super, ~ * vert Small, ~ * horiz Small, C width, C height, ~ * width height) => Solve (Banded sub super vert horiz height width) 
(Natural sub, Natural super, ~ * vert Small, ~ * horiz Small, C width, C height, ~ * width height) => Determinant (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, Indexed height, Indexed width) => Indexed (Banded sub super vert horiz height width) 
(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) 
(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) 
(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) 

type BandedGeneral sub super = Banded sub super Big BigSource

type BandedSquare sub super size = Banded sub super Small Small size sizeSource

type BandedUpperTriangular super size = BandedSquare U0 super sizeSource

data BandedIndex row column Source

Constructors

InsideBox row column 
VertOutsideBox Int column 
HorizOutsideBox row Int 

Instances

(Eq row, Eq column) => Eq (BandedIndex row column) 
(Show row, Show column) => Show (BandedIndex row column) 

bandedGeneral :: (UnaryProxy sub, UnaryProxy super) -> Order -> height -> width -> Banded sub super Big Big height widthSource

bandedSquare :: (UnaryProxy sub, UnaryProxy super) -> Order -> size -> Banded sub super Small Small size sizeSource

bandedFromFull :: (UnaryProxy sub, UnaryProxy super) -> Full vert horiz height width -> Banded sub super vert horiz height widthSource

addOffDiagonals :: (Natural subA, Natural superA, Natural subB, Natural superB, (subA :+: subB) ~ subC, (superA :+: superB) ~ superC) => (UnaryProxy subA, UnaryProxy superA) -> (UnaryProxy subB, UnaryProxy superB) -> ((Nat subC, Nat superC), (UnaryProxy subC, UnaryProxy superC))Source

class Content c Source

Instances

Content Filled 
Content Empty 

data BandedHermitian off size Source

Instances

Eq size => Eq (BandedHermitian off size) 
(Show size, Natural off) => Show (BandedHermitian off size) 
(Natural off, C size) => C (BandedHermitian off size) 
(Natural off, Indexed size) => Indexed (BandedHermitian off size) 
(Natural off, InvIndexed size) => InvIndexed (BandedHermitian off size) 
(Natural off, NFData size) => NFData (BandedHermitian off size) 
(Natural off, C size) => Box (BandedHermitian off size) 
(Natural offDiag, C size) => FormatArray (BandedHermitian offDiag size) 
(Natural offDiag, C size) => SquareShape (BandedHermitian offDiag size) 
(Natural off, C size) => Homogeneous (BandedHermitian off size) 
(Natural off, C size) => Complex (BandedHermitian off size) 
(Natural off, C size) => Admissible (BandedHermitian off size) 
(Natural offDiag, C size) => MultiplySquare (BandedHermitian offDiag size) 
(Natural offDiag, C size) => MultiplyVector (BandedHermitian offDiag size) 
(Natural offDiag, C size) => Solve (BandedHermitian offDiag size)

There is no solver for indefinite matrices. Thus the instance will fail for indefinite but solvable systems.

(Natural offDiag, C size) => Determinant (BandedHermitian offDiag size)

There is no solver for general banded Hermitian matrices. Thus the instance will fail for an indefinite matrix.

(Natural off, Indexed size) => Indexed (BandedHermitian off size) 
(Natural offDiagA, Natural offDiagB, C sizeA, ~ * sizeA sizeB, C sizeB, Eq sizeB) => Multiply (BandedHermitian offDiagA sizeA) (BandedHermitian offDiagB sizeB) 
(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) 
(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) 
(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) 
(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) 

class C shape => Box shape whereSource

Associated Types

type HeightOf shape Source

type WidthOf shape Source

Methods

height :: shape -> HeightOf shapeSource

width :: shape -> WidthOf shapeSource

Instances

C size => Box (Hermitian size) 
(Natural off, C size) => Box (BandedHermitian off size) 
(Content lo, TriDiag diag, Content up, C size) => Box (Triangular lo diag up size) 
(C vert, C horiz, C height, C width) => Box (Full vert horiz height width) 
(Eq lower, C vert, C horiz, C height, C width) => Box (Split lower vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, C height, C width) => Box (Banded sub super vert horiz height width)