h)r       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ! ! ! ! ! ! ! " " " " " " " " " " " " " " " " " " " " " " # # # # # # # # # # # # $ $ $ $ $ $ $ $%0.5.2& Safe-Inferred$  Safe-InferredUdefghijnop]_^`abcklmdefghijnop]_^`abcklm Safe-Inferred$%&*'( !"#)+,.0/-1$%&*'( !"#)+,.0/-1' Safe-Inferred  Safe-Inferredxlapack?This shape type wraps any other array shape type. However, its   instance just uses zero-based  1 indices. Thus it can turn any shape type into a  3 one. The main usage is to make an arbitrary shape {.{lapackClass of shapes where indices still make sense if we permute elements. We use this for all matrix factorisations involving permutations or more generally orthogonal transformations, e.g. eigenvalue and singular value, LU and QR decompositions. E.g. say, we have a square matrix with dimension 'Shape.Enumeration Ordering'. Its vector of eigenvalues has the same dimension, but it does not make sense to access the eigenvalues with indices like   or  . Thus   is no instance of {- (and you should not add an orphan instance).If you want to factor a matrix with a non-permutable shape, you should convert it temporarily to a permutable one, like   (i.e. ()) or x.The { class has no method, so you could add any shape to it. However, you should use good taste when adding an instance. There is no strict criterion which shape type to add.We tried to use ShapeInt for eigenvalue vectors and  LiberalSquares as transformation matrices of eigenvalue decompositions. However, this way, the type checker cannot infer that the product of the factorisation is a strict square.We also tried to use *+' for eigenvalue vectors with according  LiberalSquares transformations. This has also the problem of inferring squares. Additionally, more such transformations lead to nested *+ wrappers and for ()' even the first wrapper is unnecessary.xzy{|{xzy|, Safe-Inferred  - Safe-Inferred C . Safe-Inferred v / Safe-Inferred )*               0 Safe-Inferred)*! 1 Safe-Inferred )*5".         2 Safe-Inferred%o lapack0Make a temporary copy only for complex matrices. lapack=m and ldb>=m. lapack*Copy a m-by-n-matrix to ColumnMajor order. lapackUse the foldBalanced trick. lapackIf   would be based on a scalar loop we would not need to cut the vector into chunks. The invariance is: When calling productLoop n xPtr, starting from xPtr there is storage allocated for 2*n-1 elements.9 3 Safe-Inferred&  4 Safe-Inferred)*&b  9 9  Safe-Inferred'$  5 Safe-Inferred ,lapack Admissible tag combinations are: meas vert horiz Shape Small Small - Square Size Small Small - LiberalSquare Size Big Small - Tall Size Small Big - Wide Size Big Big - General,We can enforce this set with the constraints 7(Extent.Measured meas vert, Extent.Measured meas horiz)4However, in some cases it leads to constraints like Measured meas Small or Measured meas Big*. The former one is morally equivalent to  Measure meas- and the latter one is morally equivalent to  meas ~ Size. However, in order to convince the compiler you would have to go through .In order to circumvent this trouble we use internal functions with weaker constraints: 4(Extent.Measure meas, Extent.C vert, Extent.C horiz)This is typesafe whenever the input is based on one of the five admissible extent types. We only need the strict constraints when constructing matrices of arbitrary extent type, i.e. this almost only concerns  6.    Safe-Inferred)*5/dlapack>Construct a shape from order, dimensions and type information.lapack is either  or . These are the &s that are preserved in matrix powers. Pun intended. lapack Impossible: instance Definiteness False False False where instance Definiteness True False True where+The last one is impossible for this reason:Given x and y with  x^T*A*x < 0 and  y^T*A*y > 0<. Because of the intermediate value theorem there must be a k from [0,1] with z = k*x + (1-k)*y and  z^T*A*z = 0.  Safe-Inferred)*/1lapackFor singular valuesHowever, diagonal matrices produced by singular value decomposition may be non-square and Hermitian must be square.lapackFor Hermitian eigenvalues    Safe-Inferred3\""7 Safe-Inferred4   Safe-Inferred4lapackReturns the index and value of the element with the maximal absolute value. Caution: It actually returns the value of the element, not its absolute value!2349:5678<=;>?@ABCDLMKNOPQSTRUVEGFHIJWXYZ[\2349:5678<=;>?@ABCDLMKNOPQSTRUVEGFHIJWXYZ[\8 Safe-Inferred )*5.  9 Safe-Inferred8d lapack&Number of elements must be maintained. lapack&Number of elements must be maintained.lapackQC.forAll QC.arbitraryBoundedEnum $ \inv -> QC.forAll (QC.arbitrary >>= genPivots) $ \xs -> xs == Perm.toPivots inv (Perm.fromPivots inv xs)lapackQC.forAll genPerm2 $ \(p0,p1) -> determinant (multiply p0 p1) == determinant p0 <> determinant p1lapack #numberFromSign s == (-1)^fromEnum slapackQC.forAll genPerm2 $ \(p0,p1) -> transpose (multiply p0 p1) == multiply (transpose p1) (transpose p0))        : Safe-Inferred )*/5:nlapackLayout matrix elements for use in formatting a block matrix. Optimally its implementation is reused in  via %, but sometimes that is not possible.lapackDefault implementation of ;. Some matrices need more than one array for display, e.g.  Householder and  LowerUpper.  class is still needed for Block matrices.8         ; Safe-Inferred)*; < Safe-Inferred>) lapackMultiply two matrices with the same dimension constraints. E.g. you can multiply   and   matrices, or   and   matrices. It may seem to be overly strict in this respect, but that design supports type inference the best. You can lift the restrictions by generalizing operands with =>, (?, (@ or (A. lapackMultiply two matrices with the same dimension constraints. E.g. you can multiply   and   matrices, or   and   matrices. It may seem to be overly strict in this respect, but that design supports type inference the best. You can lift the restrictions by generalizing operands with =>, (?, (@ or (A.7  B Safe-Inferred> C Safe-Inferred> D Safe-Inferred?] E Safe-Inferred?          7F Safe-Inferred)*@ G Safe-Inferred)*@  H Safe-Inferred)*A   I Safe-InferredA[J Safe-InferredAK Safe-Inferred)*5Bdlapack =let b = takeHalf a ==> isTriangular b && a == addTransposed b/L Safe-Inferred)*BM Safe-InferredC*N Safe-Inferred)*C[  O Safe-Inferred)*CP Safe-Inferred)*CQ Safe-Inferred)*D R Safe-InferredDMS Safe-Inferred)*DT Safe-Inferred)*DU Safe-Inferred)*EV Safe-InferredE;W Safe-Inferred)*/5Fylapack is a synonym for  but lacks the admissibility check. You may thus fool the type tags. This applies to the other lift functions, too.lapackadaptOrder x y contains the data of y with the layout of x.?66 Safe-InferredG,   Safe-Inferred)*G  X Safe-InferredHlapackWe do not support unit diagonal tag for trapezoids, because unit diagonal is not preserved by multiplication of trapezoids. Safe-InferredJdlapackThe number of rows must be maintained by the height mapping function.lapackThe number of columns must be maintained by the width mapping function.lapackconjugate transpose Problem: adjoint a <> a is always square, but how to convince the type checker to choose the Square type? Anser: Use (Hermitian.toSquare $ Hermitian.gramian a instead.  Y Safe-InferredLlapackThe 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 True8 then this imposes no further restriction on the matrix.Z Safe-Inferred)*Lw9 [ Safe-Inferred)*L9 \ Safe-Inferred)*L ] Safe-InferredM- Safe-InferredNlapack3The list represents ragged rows of a sparse matrix.lapack#For symmetric eigenvalue problems,  eigensystem and schur coincide.^ Safe-Inferred)*O`lapackThe number of rows must be maintained by the height mapping function.lapackThe number of columns must be maintained by the width mapping function. _ Safe-Inferred)*/PlapackThe number of rows and columns must be maintained by the shape mapping function.lapackThe number of rows and columns must be maintained by the shape mapping function.Not available for Block matrices.&66766 Safe-Inferred)*/TlapackadaptOrder x y contains the data of y with the layout of x.lapack (vr,d,vlAdj) = eigensystem aCounterintuitively, vr0 contains the right eigenvectors as columns and vlAdj contains the left conjugated eigenvectors as rows. The idea is to provide a decomposition of a. If a is diagonalizable, then vr and vlAdj3 are almost inverse to each other. More precisely,  vlAdj <> vr is a diagonal matrix, but not necessarily an identity matrix. This is because all eigenvectors are normalized such that ` is 1. With the following scaling, the decomposition becomes perfect: let scal = takeDiagonal $ vlAdj <> vr a == vr <> diagonal (Vector.divide d scal) <> vlAdjIf a, is non-diagonalizable then some columns of vr and corresponding rows of vlAdj4 are left zero and the above property does not hold.::22 Safe-Inferred)*XA lapackgramian A = A^T * Alapack-gramianTransposed A = A * A^T = gramian (A^T)lapack$congruenceDiagonal D A = A^T * D * Alapack.congruenceDiagonalTransposed A D = A * D * A^Tlapackcongruence B A = A^T * B * Alapack&congruenceTransposed B A = A * B * A^Tlapack(anticommutator A B = A^T * B + B^T * ANot exactly a matrix anticommutator, thus I like to call it Symmetric anticommutator.lapackanticommutatorTransposed A B = A * B^T + B * A^T = anticommutator (transpose A) (transpose B)lapackaddTransposed A = A^T + A((2 Safe-Inferred)*YtlapackThe number of rows and columns must be maintained by the shape mapping function.  a Safe-Inferred\(lapack0It is an unchecked error if the shapes mismatch.lapackmultiplyStrictPart a b is almost ,multiply (clearDiagonal a) (clearDiagonal b), but it is more lazy since it does not access the elements that are multiplied with zero.lapackLazy implicit solverlapackParlett recursion for lifting a scalar function to an upper triangular matrix.;Given A and the diagonal of f(A) it solves A*f(A) = f(A)*A.Requires distinct values on the diagonal, where even almost close values can produce dramatic errors. But it admits for a nice lazy implicit implementation. Safe-Inferred\ob Safe-Inferred] Safe-Inferreddlapackconjugate transposelapackcongruence B A = A^H * B * AThe meaning and order of matrix factors of these functions is consistent:cdeflapack#congruenceAdjoint A B = A * B * A^HlapackIf (q,r) = schur a, then a = q <> r <> adjoint q, where q is unitary (orthogonal) and r0 is a right-upper triangular matrix for complex a9 and a 1x1-or-2x2-block upper triangular matrix for real a. With takeDiagonal r you get all eigenvalues of a if a5 is complex and the real parts of the eigenvalues if a: is real. Complex conjugated eigenvalues of a real matrix a. are encoded as 2x2 blocks along the diagonal.The meaning and order of matrix factors of these functions is consistent: gghijklapack (vr,d,vlAdj) = eigensystem aCounterintuitively, vr0 contains the right eigenvectors as columns and vlAdj contains the left conjugated eigenvectors as rows. The idea is to provide a decomposition of a. If a is diagonalizable, then vr and vlAdj3 are almost inverse to each other. More precisely,  vlAdj <> vr is a diagonal matrix, but not necessarily an identity matrix. This is because all eigenvectors are normalized to Euclidean norm 1. With the following scaling, the decomposition becomes perfect: let scal = takeDiagonal $ vlAdj <> vr a == vr #*\ Vector.divide d scal ##*# vlAdjIf a, is non-diagonalizable then some columns of vr and corresponding rows of vlAdj4 are left zero and the above property does not hold.The meaning and order of result matrices of these functions is consistent:glmn&&3o Safe-Inferred)*e Safe-Inferred)*f\lapack solve a b == solveDecomposed (decompose a) b solve (gramian u) b == solveDecomposed u blapackCholesky decomposition   Safe-Inferred)*k lapack toSquare (stack a b c) = toSquare a ||| b === adjoint b ||| toSquare c It holds order (stack a b c) = order b. The function is most efficient when the order of all blocks match.lapackSub-matrices maintain definiteness of the original matrix. Consider x^* A x > 0. Then y^* (take A) y = x^* A x where some components of x are zero.lapackgramian A = A^H * Alapack*gramianAdjoint A = A * A^H = gramian (A^H)lapack$congruenceDiagonal D A = A^H * D * Alapack+congruenceDiagonalAdjoint A D = A * D * A^Hlapackcongruence B A = A^H * B * Alapack#congruenceAdjoint B A = A * B * A^Hlapack(anticommutator A B = A^H * B + B^H * ANot exactly a matrix anticommutator, thus I like to call it Hermitian anticommutator.lapackanticommutatorAdjoint A B = A * B^H + B * A^H = anticommutator (adjoint A) (adjoint B)lapackscaledAnticommutator alpha A B = alpha * A^H * B + conj alpha * B^H * AlapackaddAdjoint A = A^H + Alapack#For symmetric eigenvalue problems,  eigensystem and schur coincide.662p Safe-Inferredl& Safe-Inferredllapack solve a b == solveDecomposed (decompose a) b solve (gramian u) b == solveDecomposed u blapackCholesky decomposition  q Safe-Inferredm7 Safe-Inferred)*mp&& Safe-Inferred)*n5  2r Safe-Inferred)*/s&lapackThis functions allows to multiply two matrices of arbitrary special features and returns the most special matrix type possible (almost). 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 % 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 st= 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.We require e.g. both #Extent.Multiply vertA vertB ~ vertCand #Extent.Multiply vertB vertA ~ vertCThis makes the combination commutative. At first glance this looks counterintuitive, but this allows the type checker to infer that "shape A" times "square" is "shape A".)u Safe-Inferred )*/s77777v Safe-Inferred)*ulapackWe use the solvers for positive definite Hermitian matrices also for negative definite matrices. We even use them for semidefinite matrices, because semidefinite matrices with full rank are definite.w Safe-Inferred )*/uQ7777x Safe-Inferred)*/5u) Safe-Inferredvlapack HH.minimumNorm (HH.fromMatrix a) b == Ortho.minimumNorm (adjoint a) b y Safe-Inferredw&  Safe-Inferred& lapackIf x = leastSquares a b then x minimizes Vector.norm2 (multiply a x sub b).Precondition: a must have full rank and height a >= width a.lapack The vector x with x = minimumNorm a b is the vector with minimal Vector.norm2 x that satisfies multiply a x == b.Precondition: a must have full rank and height a <= width a.lapackIf 1(rank,x) = leastSquaresMinimumNormRCond rcond a b then x is the vector with minimum Vector.norm2 x that minimizes Vector.norm2 (a #*| x sub b).Matrix a can have any rank but you must specify the reciprocal condition of the rank-truncated matrix.lapack project b d x projects x on the plane described by B*x = d.b must have full rank.lapackleastSquaresConstraint a c b d computes x with minimal || c - A*x ||_2 and constraint B*x = d.b must be wide and a===b4 must be tall and both matrices must have full rank.lapackgaussMarkovLinearModel a b d computes (x,y) with minimal  || y ||_2 and constraint  d = A*x + B*y.a must be tall and a|||b4 must be wide and both matrices must have full rank.lapackGramian determinant - works also for non-square matrices, but is sensitive to transposition. determinantAbsolute a = sqrt (Herm.determinant (Herm.gramian a))lapackFor an m-by-n-matrix a7 with m>=n this function computes an m-by-(m-n)-matrix b such that Matrix.multiply (adjoint b) a is a zero matrix. The function does not try to compensate a rank deficiency of a . That is, a|||b has full rank if and only if a has full rank.0For full-rank matrices you might also call this kernel or  nullspace.lapack !affineFrameFromFiber a b == (c,d)Means: An affine subspace is given implicitly by {x : a#*|x == b}. Convert this into an explicit representation {c#*|y|+|d : y}. Matrix a must have full rank, otherwise the explicit representation will miss dimensions and we cannot easily determine the origin d as a minimum norm solution.The computation is like .c = complement $ adjoint a d = minimumNorm a bbut the QR decomposition of a is computed only once.lapack&This conversion is somehow inverse to . However, it is not precisely inverse in either direction. This is because both  and  accept non-orthogonal matrices but always return orthogonal ones.In affineFiberFromFrame c d , matrix c should have full rank, otherwise the implicit representation will miss dimensions.z Safe-Inferred )*/2lapackI do not know, if you will ever need this. For diagonal matrices you may not need a wrapper at all and for other matrices you may use .{ Safe-Inferred )*/lapack+You may wrap non-diagonal band matrices in |} first in order to meet the  constraint.  Safe-Inferred8 Safe-Inferred  Safe-Inferred/_ lapack&Square matrices will be classified as .lapackTake 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.lapackDrop 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.lapackThe function is optimized for blocks of consecutive rows. For scattered rows in column major order the function has quite ugly memory access patterns.lapack+Use the element order of the first operand.lapack,Use the element order of the second operand.lapackChoose element order such that, if possible, one part can be copied as one block. For  this means that RowMajor, is chosen whenever at least one operand is RowMajor and  ColumnMajor" is chosen when both operands are  ColumnMajor.lapack tensorProduct order x y = singleColumn order x #*# singleRow order ylapack  approxArray (dividedDifferencesMatrix xs (ys0|+|ys1)) (dividedDifferencesMatrix xs ys0 #+# dividedDifferencesMatrix xs ys1)QC.forAll genDD $ \(xs, (ys0,ys1)) -> approxArray (dividedDifferencesMatrix xs (Vector.mul ys0 ys1)) (dividedDifferencesMatrix xs ys0 <> dividedDifferencesMatrix xs ys1) lapackQC.forAll (QC.choose (0,10)) $ \n -> let sh = shapeInt n in QC.forAll (Util.genDistinct [-10..10] [-10..10] sh) $ \xs -> approxArray (DD.parameterDifferencesMatrix xs) (DD.upperFromPyramid sh (Vector.zero sh : DD.parameterDifferences xs))  `++////////*///////////////1111111111111111111111111111111111111111111111111111111111=1111111111111111111111111113)3555                                                                               ? >                                                                                                           =                              6   @ A  88888888999*9*9999999999999t:::::::::::::::::::::::::::(:::<WWWWWWWWWWWW=WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXtYYYYYYYYYYYYY[[\\\\\\\\]]]]]]]]]]]]=]]]cg^^^^_________________________________>_____tgcfed>?tejglchfkejdiglt>tuuuuuuuuuuuuuuuuwwwwwwwwwwwwwwwwx=xxxxxxxz}z{{ ?   @ A                                                                                  lnm~~~~=~~~~~~~=~~~~~!!!!!!=!=""""""""""""""               ##(##########$$$$$$$$&&&&&''''''''',,,------...///////////////////////////////////////////////=//////*/////=///////////////@/A//////6////////////////////////////000000000011111111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222 2 2 2 2 2 2 2 2 33=333333 3 33?3@3A33333 4 4 4 4 4 4 44 4 4 4 4 4 4 4 4 4 44 44 4 4 4444 4 4 4 44 4 4 4 4 4 4 444 4 4 4 4444444 4 4 4 444 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 55 5 5 5 5 55555 5  7 7 77 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 888 8 8 8 888 8 8 8 8 8 9 99 9 9999 9 999 9 9 9 999 9999 9 9:: : : : : : : : : : : : : ::::: : : : :: ::;;;;; ; ;; ; <t< < < < < < < <<<<< <<<<<<<<<<<<<< << <<<<< <<<<<<<< < < <<< < <<<< < < BBBlCC>C?C CCCCCCCCCCCCCC CCCCCCeCjDDDDlDmDnDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFF6FFFFFF FGGGGGGGGGGGHHHHHHHHHHtHIII=IIIIIIIIII III I IIII>IIIIIIIItIJ=JJJ JJJJJJJ J JJJ>JJJ JJJ K K K K KKKKKK K KK K KK KKK K K K K K KK K K K K K K K KcKK K K K K KeKKKK KK LLLLfLMNNN NNNNNOOOPPlQQQQQQRSSlTT TTT TTTTTTTTTTcTTU UVVlX X XXXX X X XXX XXXXXXtYY Y Y Y Y Y Y Y Y YYY ZZ Z Z Z Z \ \ ] ] ]^^^^>^ ^^ ata aa aaa a a aaaa a a a bbboooolo ppplpqq q qr r r r r r r r r r r r r r r r r r r r r rrrrr r r r r r r r r r r r r r r ru u u u uu u u u u u u u u vvvw xxx x x x xxxxxxx xx xx xx xxx xxxx x xxxxx yyyyyyyyy z z}z zz z z z z z z z z zz { { { {{ {        ~ ~ ~ ~ ~  lapack-0.5.2-inplaceNumeric.LAPACK.VectorNumeric.LAPACK.Matrix.LayoutNumeric.LAPACK.Permutation%Numeric.LAPACK.Orthogonal.Householder%Numeric.LAPACK.Matrix.BandedHermitianNumeric.LAPACK.ScalarNumeric.LAPACK.OutputNumeric.LAPACK.ShapeNumeric.LAPACK.Matrix.ExtentNumeric.LAPACK.Matrix.ShapeNumeric.LAPACK.Matrix Numeric.LAPACK.Matrix.Shape.OmniNumeric.LAPACK.FormatNumeric.LAPACK.Matrix.TypeNumeric.LAPACK.Matrix.ArrayNumeric.LAPACK.Matrix.SpecialNumeric.LAPACK.Matrix.Full!Numeric.LAPACK.Matrix.Permutation Numeric.LAPACK.Matrix.TriangularNumeric.LAPACK.Matrix.HermitianNumeric.LAPACK.Matrix.SymmetricNumeric.LAPACK.Matrix.BandedNumeric.LAPACK.Matrix.QuadraticNumeric.LAPACK.Matrix.Square/Numeric.LAPACK.Matrix.HermitianPositiveDefinite5Numeric.LAPACK.Matrix.BandedHermitianPositiveDefiniteNumeric.LAPACK.Matrix.DiagonalNumeric.LAPACK.OrthogonalNumeric.LAPACK.Singular!Numeric.LAPACK.Matrix.SuperscriptNumeric.LAPACK.Matrix.Function Numeric.LAPACK.Matrix.Block.TypeNumeric.LAPACK.Matrix.Block Numeric.LAPACK.Linear.LowerUpper)Numeric.LAPACK.Example.EconomicAllocation(Numeric.LAPACK.Example.DividedDifferencelapack"Numeric.LAPACK.Matrix.Layout.Basic'Numeric.LAPACK.Matrix.Hermitian.PrivateMatrixShapeIntShape IntIndexedNumeric.LAPACK.Shape.PrivateNumeric.LAPACK.Vector.PrivateNumeric.LAPACK.Wrapper$Numeric.LAPACK.Matrix.Extent.Private#Numeric.LAPACK.Matrix.ModifierTyped$Numeric.LAPACK.Matrix.Layout.PrivateNumeric.LAPACK.PrivateNumeric.LAPACK.Matrix.Private$Numeric.LAPACK.Matrix.Mosaic.Private#Numeric.LAPACK.Matrix.Extent.Strict fromSquareNumeric.LAPACK.Linear.Private"Numeric.LAPACK.Matrix.Plain.Format"Numeric.LAPACK.Permutation.Private"Numeric.LAPACK.Matrix.Type.Private$Numeric.LAPACK.Matrix.Mosaic.GenericNumeric.LAPACK.Matrix.BasicSquaretoFullfromFullgeneralizeTallgeneralizeWide"Numeric.LAPACK.Matrix.Square.Eigen"Numeric.LAPACK.Matrix.Square.BasicNumeric.LAPACK.Singular.PlainNumeric.LAPACK.Matrix.Plain%Numeric.LAPACK.Matrix.Mosaic.Unpacked#Numeric.LAPACK.Matrix.Mosaic.Packed&Numeric.LAPACK.Matrix.Triangular.Basic"Numeric.LAPACK.Matrix.Banded.BasicNumeric.LAPACK.Split'Numeric.LAPACK.Matrix.Symmetric.Unified%Numeric.LAPACK.Matrix.Symmetric.Basic&Numeric.LAPACK.Matrix.Symmetric.Linear"Numeric.LAPACK.Matrix.Mosaic.Basic'Numeric.LAPACK.Matrix.Triangular.Linear&Numeric.LAPACK.Matrix.Triangular.Eigen%Numeric.LAPACK.Matrix.Hermitian.Basic&Numeric.LAPACK.Matrix.Hermitian.Linear%Numeric.LAPACK.Matrix.Hermitian.Eigen+Numeric.LAPACK.Matrix.BandedHermitian.Basic!Numeric.LAPACK.Matrix.Plain.Class+Numeric.LAPACK.Matrix.BandedHermitian.Eigen#Numeric.LAPACK.Matrix.Array.Private$Numeric.LAPACK.Matrix.Array.Unpacked"Numeric.LAPACK.Matrix.Array.Mosaic#Numeric.LAPACK.Matrix.Array.IndexedNumeric.LAPACK.Matrix.Indexed%Numeric.LAPACK.Matrix.Array.Hermitian"Numeric.LAPACK.Matrix.Array.Banded!Numeric.LAPACK.Matrix.Array.BasicNumeric.LAPACK.Matrix.ClassnormInf1*Numeric.LAPACK.Matrix.Lazy.UpperTriangular#Numeric.LAPACK.Matrix.Square.Lineargramiananticommutator congruencecongruenceDiagonal eigensystemgramianAdjointanticommutatorAdjointcongruenceAdjointcongruenceDiagonalAdjoint decompose decomposeTall decomposeWide6Numeric.LAPACK.Matrix.HermitianPositiveDefinite.Linearhyper formatAlignedformatSeparateTriangledecorateTriangle $fOutputBox $fOutputHtml $fEqSeparator$fOrdSeparator$fShowSeparator $fEqStyle $fEnumStyledeconsIntIndexed PermutableshapeInt$fPermutableTagged$fPermutableDeferred$fPermutableCyclic$fPermutableOneBased$fPermutableZeroBased$fPermutableShifted$fPermutableRange$fPermutable()$fPermutableZero$fPermutableIntIndexed$fInvIndexedIntIndexed$fIndexedIntIndexed $fCIntIndexed$fNFDataIntIndexed$fEqIntIndexed$fShowIntIndexedMultiplyMeasureAppend AppendModeMeasure switchMeasureC switchTagSizeSmallBigExtentsquare squareSizeheightwidth dimensions transposefuse appendSame appendLeft appendRight appendAnyBandedHermitianbandedHermitianOffDiagonalsbandedHermitianOrderbandedHermitianSize BandedIndex InsideBoxVertOutsideBoxHorizOutsideBoxDiagonalBandedUpperTriangularBandedLowerTriangular BandedSquare BandedGeneralBandedbandedOffDiagonals bandedOrder bandedExtent UnaryProxyFilledBands Hermitian HermitianP Symmetric SymmetricPUpperTriangularUpperTriangularPLowerTriangularLowerTriangularP TriangularMirror autoMirrorMirrorSingletonNoMirror SimpleMirrorConjugateMirrorPacking autoPackingPackingSingletonPackedUnpackedMosaic mosaicPack mosaicMirror mosaicUplo mosaicOrder mosaicSizeTriangle ReflectorSplitWideTallGeneralFull fullOrder fullExtent fullHeight fullWidthgeneraltallwide liberalSquareupperTriangularlowerTriangularupperTriangularPlowerTriangularP symmetric symmetricP hermitian hermitianPautoUploaddOffDiagonals bandedGeneral bandedSquare SplitGeneral splitGeneral splitFromFulldiagonalbandedFromFullbandedHermitianMeasuredswitchMeasuredMap MergeUnitUnitIfTriangularMultipliedPropertyMultipliedStripMultipliedBandsToPlaintoPlain FromPlainPlain fromPlain Quadratic quadraticConsconsOmniUnitBandedTriangularBandedTriangularSingletonBandedDiagonal BandedUpper BandedLowerBandedTriangularPower PowerIdentity PowerDiagonalPowerUpperTriangularPowerLowerTriangularPowerSymmetricPowerHermitian PowerFullPowerStripSingleton PowerStripswitchPowerStripStripSingleton StripBands StripFilledStrip switchStripPropertySingleton PropArbitraryPropUnit PropSymmetric PropHermitianPropertyHermitianNegativeSemidefiniteHermitianNegativeDefiniteHermitianPositiveSemidefiniteHermitianPositiveDefiniteHermitianUnknownDefiniteness DiagSingletonUnit ArbitraryTriDiag switchTriDiagautoDiagcharFromTriDiag hermitianSetpropertySingletonpropertystripSingletonstripspowerStripSingleton powerStripspackTagpowerSingletonbandedTriangularSingletonuncheckedDiagonaltoBandedtoBandedHermitianextent mapHeightmapWidth mapSquareSizeorder$fNFDataDiagSingleton$fShowDiagSingleton$fEqDiagSingleton$fDefinitenessFalseFalseTrue$fDefinitenessFalseTrueFalse$fDefinitenessTrueFalseFalse$fDefinitenessFalseTrueTrue$fDefinitenessTrueTrueFalse$fDefinitenessTrueTrueTrue$fPropertyHermitian$fPropertySymmetric$fPropertyUnit$fPropertyArbitrary$fTriDiagArbitrary $fTriDiagUnit$fBandedTriangularSuccZero$fBandedTriangularZeroSucc$fBandedTriangularZeroZero $fStripFilled $fStripBands$fCOmni $fNFDataOmni>$fFromPlainPackedHermitianBandsBandsShapeSmallSmallheightwidth9$fFromPlainPackedUnitBandsBandsShapeSmallSmallheightwidth<$fFromPlainPackedArbitraryBandsBandsmeasverthorizheightwidth>$fFromPlainpackHermitianFilledFilledShapeSmallSmallheightwidth>$fFromPlainpackSymmetricFilledFilledShapeSmallSmallheightwidth8$fFromPlainpackdiagFilledBandsShapeSmallSmallheightwidth8$fFromPlainpackdiagBandsFilledShapeSmallSmallheightwidth$fFromPlainUnpackedArbitraryFilledFilledmeasverthorizheightwidth<$fToPlainPackedHermitianBandsBandsShapeSmallSmallheightwidth7$fToPlainPackedUnitBandsBandsShapeSmallSmallheightwidth:$fToPlainPackedArbitraryBandsBandsmeasverthorizheightwidth<$fToPlainpackHermitianFilledFilledShapeSmallSmallheightwidth<$fToPlainpackSymmetricFilledFilledShapeSmallSmallheightwidth6$fToPlainpackdiagFilledBandsShapeSmallSmallheightwidth6$fToPlainpackdiagBandsFilledShapeSmallSmallheightwidth>$fToPlainUnpackedArbitraryFilledFilledmeasverthorizheightwidth$$fQuadraticPackedHermitianBandsBands$fQuadraticPackedUnitBandsBands$$fQuadraticPackedArbitraryBandsBands&$fQuadraticPackedHermitianFilledFilled&$fQuadraticPackedSymmetricFilledFilled $fQuadraticPackeddiagFilledBands $fQuadraticPackeddiagBandsFilled&$fQuadraticUnpackedArbitrarylowerupper,$fConsPackedHermitianBandsBandsmeasverthoriz'$fConsPackedUnitBandsBandsmeasverthoriz,$fConsPackedArbitraryBandsBandsmeasverthoriz.$fConsPackedHermitianFilledFilledmeasverthoriz.$fConsPackedSymmetricFilledFilledmeasverthoriz($fConsPackeddiagFilledBandsmeasverthoriz($fConsPackeddiagBandsFilledmeasverthoriz.$fConsUnpackedArbitraryloweruppermeasverthoriz$fPowerStripFilled$fPowerStripBands $fShowOmni$fEqOmniUpperQuasitriangularPositiveDiagonal RealDiagonalBandedUnitUpperBandedUnitLowerBandedUnitTriangularGenTriangularLoUprunGenTriangularLoUpGenTriangularDiagrunGenTriangularDiag UpLoSingletonLowerUpper DiagUpLoCswitchDiagUpLoDiagUpLoUpLoC switchUpLoUpLoIdentity QuadraticMeas LiberalSquareidentity triangularunitTriangulararbitraryTriangular$fDiagUpLoCFilledBands$fDiagUpLoCBandsFilled$fDiagUpLoCBandsBands$fUpLoCFilledBands$fUpLoCBandsFilled toGeneralfromSquareLiberalfromLiberalSquare weakenTall weakenWideRandomDistribution UniformBox01 UniformBoxPM1Normal UniformDisc UniformCircleVectornormInf argAbsMaximumdividereciprandom$fEqRandomDistribution$fOrdRandomDistribution$fShowRandomDistribution$fEnumRandomDistribution FormatArray formatArrayConfig configFormat configEmptydeflt defltConfigElementSignPositiveNegative Permutationsize fromPivotstoPivots determinantnumberFromSigninversionFromTransposition TransposeTransposeExtra mapExtent ToQuadraticheightToQuadraticwidthToQuadraticBoxBoxExtra MultiplySameMultiplySameExtra multiplySameLayout LayoutExtralayoutFormat FormatExtraformatScaleProductformatWithLayoutindices OrderBias MapExtent SubtractiveAdditive Homogeneous PlainArray FullQuadratic SquareMeas ArrayMatrixArray OmniArrayasPacked asUnpackedrequirePacking plainShapeshapesubBandsSingletonsuperBandsSingletonreshapemapShapetoVectorunwrap fromVectorlift0lift1lift2lift3lift4unlift1unlift2unpackedToVector liftUnpacked0 liftUnpacked1 liftUnpacked2 liftUnpacked3 unliftRow unliftColumndiagTag scaleRealReal forceOrder adaptOrder liftOmni1 liftOmni2toMatrixapplyfromPermutation toPermutationtoSquaremultiplyVector multiplyFulladjoint QuasiUpper FlexUpper FlexLower UnitUpper UnitLower FlexHermitianHermitianPosSemidefHermitianPosDefIndexed#! SemidefiniteassureFullRank assureAnyRankrelaxSemidefiniterelaxIndefiniteassurePositiveDefinitenessrelaxDefinitenessasUnknownDefinitenessRectangularDiagonal FlexDiagonal FlexBanded takeDiagonal toHermitian takeTopLefttakeBottomRightsumRank1 eigenvaluesunpackidentityFromShape identityOrderSubtractiveExtra AdditiveExtra ScaleExtraHomogeneousExtrazeroFromUnpack UnpackExtraMapSize MapSquareSize SquareShapeSquareShapeExtra identityFromtrace.*##+##-# lowerFromList upperFromListautoLowerFromListautoUpperFromListasLowerasUpperrequireUnitDiagonalrequireArbitraryDiagonalpack takeLower takeUpperfromLowerRowMajorfromUpperRowMajortoLowerRowMajortoUpperRowMajorrelaxUnitDiagonalstrictArbitraryDiagonal stackLower#%%% stackUpper%%%# splitLower splitUppertakeBottomLeft takeTopRightsolveinverse fromHermitian fromUpperassureSymmetrystack#%%%#split tensorProductsumRank1NonEmptygramianTransposedcongruenceDiagonalTransposedcongruenceTransposedanticommutatorTransposed addTransposed asDiagonal asSymmetricmapSize$fDiagonalSymmetric$fDiagonalArbitraryliberalFromFull fromScalartoScalaridentityFromWidthidentityFromHeight|=|powerschur schurComplexsolveDecomposed*%%%#outersumRank2sumRank2NonEmpty fromSymmetric addAdjointsquareFromListtoLowerTriangulartoUpperTriangulartakeTopLeftSquaretakeBottomRightSquarenoUnitlift%%%Multiply PowerExtrapowers1MultiplySquareMultiplySquareExtraMultiplyVectorMultiplyVectorExtra#*|-*##*####*#powers#*#Inverse InverseExtraSolve SolveExtra solveRight solveLeft DeterminantDeterminantExtra#\####/# solveVector#\|-/# HouseholderdeterminantAbsolute fromMatrix leastSquares minimumNormextractQ tallExtractQ tallMultiplyQtallMultiplyQAdjoint multiplyQextractR tallExtractR tallMultiplyR tallSolveRleastSquaresMinimumNormRCondpseudoInverseRCondprojectleastSquaresConstraintgaussMarkovLinearModel householderhouseholderTall complementaffineFrameFromFiberaffineFiberFromFrametallFromGeneralwideFromGeneral asGeneralasTallasWide caseTallWide singleRow singleColumn flattenRow flattenColumnliftRow liftColumnfromRowsNonEmpty fromRowArrayfromRowsNonEmptyContainerfromRowContainerfromRowsfromColumnsNonEmptyfromColumnArrayfromColumnsNonEmptyContainerfromColumnContainer fromColumnstoRows toColumns toRowArray toColumnArraytoRowContainertoColumnContainertakeRow takeColumntakeTop takeBottomtakeRowsdropRows takeColumns dropColumns takeEqually dropEquallyswapRows swapColumns reverseRowsreverseColumns takeRowArray takeRowSet takeRowIntSettakeColumnArray takeColumnSettakeColumnIntSet fromRowMajor toRowMajor|||===leftBias rightBiascontiguousBiasrowSums columnSumsrowArgAbsMaximumscolumnArgAbsMaximumsmap|*- kronecker scaleRows\*# scaleColumns#*\ scaleRowsRealscaleColumnsReal\\##/\multiplySquarevalues valuesTall valuesWidedecomposePolar PseudoInverse ConjugateAdjointNone SuperscriptExponent#^$fSuperscriptNone$fSuperscriptTranspose$fSuperscriptAdjoint$fSuperscriptConjugate$fSuperscriptInverse$fSuperscriptPseudoInverse$fSuperscriptPowerLiftRealliftRealLoglogExpexpSqRtsqrt sqrtSchursqrtDenmanBeaversexpRealHermitianlogUnipotentUpper$fSqRtHermitian$fSqRtSymmetric$fSqRtArbitrary $fSqRtUnit$fExpSymmetric$fExpHermitian$fExpArbitrary$fLiftRealSymmetric$fLiftRealHermitian$fLiftRealArbitrary$fLogSymmetric$fLogHermitian$fLogArbitraryAboveBesideschurComplement aboveFromFullbesideFromFullsquareFromSymmetric LowerUpperextractP multiplyPextractL wideExtractL wideMultiplyL wideSolveLextractU tallExtractU tallMultiplyU tallSolveUprint##$fFormatMatrix $fFormatArray$fFormatPermutation $fFormat(,,) $fFormat(,) $fFormat[]$fFormatComplex$fFormatDouble $fFormatFloat $fFormatInt SquareMatrixZeroInt2 balances0 expenses0 normalizenormalizeSplitcompleteIdSquareiterated compensatedmain subSlicesparameterDifferencesdividedDifferencesupperFromPyramiddividedDifferencesMatrixparameterDifferencesMatrixtransposeFromOrderswapOnRowMajorsideSwapFromOrderconjugatedOnRowMajor uploFromOrdergetDeterminant TakeDiagonalrunTakeDiagonal runDiagonalData.Array.Comfort.Shapeghc-prim GHC.TypesIntLTEQ Enumeration ZeroBased UncheckeddeconsUnchecked ArgMaximum runArgMaximumabsMaxuncheckrecheckFlipgetFlipUnifygetUnifyMultiplyMeasureLawgetMultiplyMeasureLaw MeasureFactMultiplyTagLawgetMultiplyTagLawTagFact AppendAny getAppendAnyAccessor getAccessor GenToWide getGenToWide GenToTall getGenToTall WeakenWide getWeakenWide WeakenTall getWeakenTallGenWide getGenWideGenTall getGenTall GenSquare getGenSquareRotLeft3 getRotLeft3Separate switchTagPairswitchMeasureExtenterrorTagTripleAux showConsterrorTagTripleswitchTagTriple genSquaregenLiberalSquare relaxMeasure genToTall genToWidesquareFromFullliberalSquareFromFullshowsPrecSquare showsPrecAnywidenreduceWideHeightreduceConsistentmapWrap recheckAppend fuseUncheckedrelaxMeasureWith appendLeftAuxstackGenmultiplyTagLaw heightFact widthFactmultiplyMeasureLaw measureFact unifyLeft unifyRightSquareTranspositiontransposeTranspositiontransposeSquareExtenttranspositionToUntypedfromSquareTranspositionsquareFromTransposition splitExtent splitOrder TriangularP TriTransposedGetBandsBandedSquareMeasemptyu0 natFromProxy uploOrder mapChecked fullIndicesfullIndexFromOffset fullMapExtent splitHeight splitWidthsplitMapExtentcaseTallWideSplit splitPartsquareFromMosaicmosaicFromSquare triangularPsymmetricFromHermitianhermitianFromSymmetrictriangularTransposeuploChartriangleIndicestriangleOffsettriangleSizeOffsettriangleIndexFromOffsetsquareRootDouble squareExtenttriangleRootDoubletriangleExtent bandedHeight bandedWidthbandedMapExtent bandedBreadthnumOffDiagonalsbandedTransposediagonalInverserectangularDiagonalbandedIndicesRowMajor bandedOffset outsideOffsetbandedIndexFromOffsetbandedHermitianIndexFromOffsetconjugateToTemp copySubMatrixcopyToColumnMajor productLoop ComplexShapeLACGVgetLACGVSumrunSum CopyToTemp runCopyToTemprealPtrfill copyBlock copyToTempcomplexConjugateToTemp condConjugate copyConjugatecopyCondConjugatecondConjugateToTempcopyCondConjugateToTempcopySubTrapezoidcopyTransposedcopyToSubColumnMajorcopyToColumnMajorTemp pointerSeqcreateHigherArraysumReal sumComplex sumComplexAltmulRealmulPairslacgvgemvgbmv initializeMVwithAutoWorkspaceInfowithAutoWorkspacewithInfoargMsg errorCodeMsgrankMsg definiteMsgeigenMsgpokeCIntpeekCInt ceilingSizecaseRealComplexFunc getConstFuncixReal ixImaginary argGeneral argSquare revealOrder FunctionArgapplyArgFuncArgUnpacked FuncArgPacked LabelResult FunctionPair FuncUnpacked FuncPackedFuncCont FuncLabelTriArg Labelled2LabelledgetMap MultiplyRightgetMultiplyRight MosaicUpper MosaicLowerMosaicUnpacked MosaicPackeddiagonalPointersdiagonalPointerPairscolumnMajorPointersrowMajorPointers forPointerscopyTriangleToTemp unpackToTemppackRect _unpackZero unpackZero fillTriangle copyTriangleA copyTriangleC copyRectangle fromBanded fromLowerPart leaveDiagonallabelnoLabel runUnlabelledrunLabelledLinearrunLabelledWorkspace$*$** runPacking withPackingwithPackingLineartriArg applyFuncPairCons_getCons Dimension MeasureTarget RotRight3 getRotRight3 consCheckedunifiers DefinitenesssolverwithDeterminantInfo diagonalMsgToTuple getToTupleTuple TupleShape formatVector layoutFull layoutSplitformatMirroredlayoutMirroredcomplementTriangleformatDiagonallayoutTriangular padTrianglepadUpperTrianglepadLowerTriangleslice layoutBanded padBandedlayoutBandedHermitianpadBandedHermitianshiftRow splitRowsarrayFromList2incompleteArrayFromList2splitArrayFromList2incompleteSplitArrayFromList2 fillTupleprintfFloatingPlainprintfFloatingprintfFloatingMaybe printfComplex complexTuplemapSizeUnchecked deconsElement deconsShapefromTruncatedPivots fromPivotsGen condNegateodddropEventransposeToMutablemultiplyUnchecked initMutabledeconsElementPtrMapExtentStripMapExtentExtraStaticIdentitystaticIdentityStaticIdentityStripStaticIdentityExtraNFDatarnf ProductUpper ProductLower ProductExtraU ProductExtraL ProductType asQuadraticattachSeparators formatCellscaleWithCheck swapMultiply unpackDirtyunpackDirtyAuxwithPackrepackmultiplyColumnMajor ScaleRowsRealgetScaleRowsRealContiguousBias RightBiasLeftBias forceRowMajortakeSub stackMosaic stackBiased liftRowMajorscaleRowsComplexscaleColumnsComplexmultiplyVectorUncheckedtransposableFromFullfullFromTransposablefromFullUnchecked diagonalOrdermultiplyCompatiblemapExtentSizesidentityFatOrder diagonalFat determinantRextractTrianglemultiplyTriangularsolveTriangulartakeHalfSYRSYMVSPMV narrowMirrorconjugationFromMirror addMirroredcomplementUnpackedmultiplyVectorCont forceUpperupperFromLowerwithSyrSingletonsprsyr outerCont outerUpper upperShape unpackedShapeskipCheckCongruencepostHooktemporaryUnpackedgramianParameters gramianIOscaledAnticommutatorIOscaledAnticommutatorscaledAnticommutatorTransposedcongruenceRealDiagonal congruenceRealDiagonalTransposedblockDiagonalPointers autoWorkspacereunpack StaticVectorcheckLowerTrapezoidUpperTrapezoid fillLower fillUpperfillBoth FlexUpperP FlexLowerP UnitUpperP UnitLowerPUpperPLowerPFlexHermitianPHermitianPosSemidefPHermitianPosDefPassureMirrored accessBandedboxIx accessAlt accessMaybe checkedZero AnyHermitian AnyHermitianP SymmQuadraticUnitTriangular identityOmnisignNegativeDeterminantmultiplyStrictPartparlettsample fromStorable toStorablereplaceDiagonal rank2Part rank2DiffPartapplyUnchecked_scaledAnticommutatorsolveColumnMajor matrixMatrixPackingByStripMultipliedPackingFactor FactorFullFactorUnitBandedTriangularFactorBandedHermitian FactorBandedFactorHermitianFactorSymmetricFactorLowerTriangularFactorUpperTriangularFactorQuadraticfactorSingleton matrixVector vectorMatrixtransposableSquareextentFromSquare fullSquare squareFull vectorSquarepowers1Diagonal powers1Gen asArbitraryunpackedSquaresquareUnpackedunpackedUnpackedunpackedBandedbandedUnpacked bandedBanded bandedUpper bandedLowerprev unifyFactorsunflexflexMultipliedExtra Multiplied IdentityMaesfactorIdentityLeftfactorIdentityRight reshapeHeight reshapeWidth reshapeVectorHouseholderFlex SplitArrayHhsplit_leastSquaresAuxminimumNormAuxaddRows extractQAuxadjointFromTransposeinvCharlayoutTauSquareextractComplement PowerStripsPowerStripFactPowerStripsStripPowerStripsExtraFillFillStripsStripFillStripsExtraMapExtentExtentfilledPowerStripFact InverseStripPseudoInvNTAsqrt2 logUnipotent $fSolveSquare$fDeterminantSquare##*##|||#===#