lapack-0.2.1: 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) => FormatArray (Full vert horiz height width) 
(C vert, C horiz, Eq height, C width, C height) => MultiplyLeft (Full vert horiz height width) 
(C vert, C horiz, Eq width, C width, C height) => MultiplyRight (Full vert horiz height width) 
(~ * vert Small, ~ * horiz Small, C width, C height, ~ * height width) => Inverse (Full vert horiz height width) 
(~ * vert Small, ~ * horiz Small, C width, C height, ~ * height width) => Solve (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) => 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 => FormatArray (Hermitian size) 
(Eq shape, C shape) => MultiplyLeft (Hermitian shape) 
(Eq shape, C shape) => MultiplyRight (Hermitian shape) 
C shape => Inverse (Hermitian shape) 
C shape => Solve (Hermitian shape) 
(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, Content up, TriDiag diag, C size) => FormatArray (Triangular lo diag up size) 
(Content lo, Content up, TriDiag diag, Eq shape, C shape) => MultiplyLeft (Triangular lo diag up shape) 
(Content lo, Content up, TriDiag diag, Eq shape, C shape) => MultiplyRight (Triangular lo diag up shape) 
(DiagUpLo lo up, TriDiag diag, C shape) => Inverse (Triangular lo diag up shape) 
(Content lo, Content up, TriDiag diag, C shape) => Solve (Triangular lo diag up shape) 
(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

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) => FormatArray (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, Eq height, C width, C height) => MultiplyLeft (Banded sub super vert horiz height width) 
(Natural sub, Natural super, C vert, C horiz, Eq width, C width, C height) => MultiplyRight (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 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 TriDiag diag whereSource

Methods

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

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 offDiag, C size) => FormatArray (BandedHermitian offDiag size) 
(Natural offDiag, C size, Eq size) => MultiplyLeft (BandedHermitian offDiag size) 
(Natural offDiag, C size, Eq size) => MultiplyRight (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 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)