!ӷ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                          ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9:;<=>?@ABCD E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a bcd e f g h ijklmnopqr s tuvwxyz{ | } ~                                                               4Safe&'HVz !"NoneHV Safes#$%SafeHV  Safe&'@AHVb&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu vwxyzNone,@AHUV!IlapackPStore the upper triangular half of a real symmetric or complex Hermitian matrix.!"%$#&)('*+,-./03214{|}~56789:;<=>?@ABCDGFEHIJLKMNOPQRSTUVWYXZ\[]^_`abcdefghiNoneHV$jlapackj; denotes a range starting at zero and has a certain length.jklmjklmNoneHV'lapack0Make a temporary copy only for complex matrices.lapack<In ColumnMajor: Copy a m-by-n-matrix with lda>=m and ldb>=m.lapack*Copy a m-by-n-matrix to ColumnMajor order.-None(W!"#$%&'()*+,-./012345789:;<=>?@ABCDHEFGIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghistuvwxyz{|WUTSRVWXY^_Z[\]`cbaQsMNOPtuIJKLzCDHEFG<;:98vwxydf5e=>AB?@/0123.-,+*&'()hi{4g7!"#$%|Safe+ }~ }~None, NoneHUV<lapack singleton = constant ()!However, singleton does not need  constraint.lapack :dot x y = Matrix.toScalar (singleRow x <#> singleColumn y)lapack inner x y = dot (conjugate x) ylapackrSum of the absolute values of real numbers or components of complex numbers. For real numbers it is equivalent to .lapack9Euclidean norm of a vector or Frobenius norm of a matrix.lapackComputes (almost) the infinity norm of the vector. For complex numbers every element is replaced by the sum of the absolute component values first.lapackReturns 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!lapackReturns the index and value of the element with the maximal absolute value. The function does not strictly compare the absolute value of a complex number but the sum of the absolute complex components. Caution: It actually returns the value of the element, not its absolute value!00NoneHV> NoneHUV?"     NoneHVFlapackIf (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.NoneHVG<9 NoneHUVG ! NoneH-"#$%!NoneHt&'()*+"None,HUVPlapackadaptOrder x y contains the data of y with the layout of x.lapack'For upper triangular matrices it holds: ItoSquare (stack a b c) = toSquare a ||| b === constant 0 ||| toSquare c5For the other triangular flavors it holds accordingly It holds order (stack a b c) = order bD. The function is most efficient when the order of all blocks match. lapackWInclude symmetric matrices. However, symmetric matrices do not preserve unit diagonals.66     #NoneQ,-./0123456789$None,HVQ:;%NoneHUVR !"&NoneHUVVq*lapack HtoSquare (stack a b c) = toSquare a ||| b === adjoint b ||| toSquare c It holds order (stack a b c) = order bD. The function is most efficient when the order of all blocks match.4lapackA^H * A<lapackA^H + A5lapackA^H + A#$%&'()*+,-./012345'NoneHVW 678(None&'HUVW9:;<=>?@ABC)None &',@AHUVnDlapackThis class allows to multiply two matrices of arbitrary special features and returns the most special matrix type possible. At the first glance, this is handy. At the second glance, this has some problems. First of all, we may refine the types in future and then multiplication may return a different, more special type than before. Second, if you write code with polymorphic matrix types, then E% 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 K= functions from the various modules for production use. Btw. F and HR are much less problematic, because the input and output are always dense vectors.KlapackQMultiply two matrices with the same dimension constraints. E.g. you can multiply General and General 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 ,/.=lapackQMultiply two matrices with the same dimension constraints. E.g. you can multiply General and General 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 ,/.>?@ABCDEFDEGFGHIJHK=IJKLME7G7I70NonepUlapackconjugate transposeLMNOPQRSTUVWXYZ[\]^_1NoneHVpNO NoneHVrWalapack#For symmetric eigenvalue problems,  eigensystem and schur coincide.#$%&'()*+,-./012345678`a#$%&'()*+,-./012345678`a2NoneHVsPQNoneHVuclapack#For symmetric eigenvalue problems,  eigensystem and schur coincide.9:;<=>?@ABCbc9:;<=>?@BACbc3NoneHVudef Nonehlapack (vr,d,vl) = eigensystem aCounterintuitively, vr% contains the right eigenvectors and vlV contains the left eigenvectors as columns. The idea is to provide a decomposition of a. If a is diagonalizable, then vr and vl3 are almost inverse to each other. More precisely, adjoint vl <#> vr is a diagonal matrix. This is because all eigenvectors are normalized to Euclidean norm 1. With the following scaling, the decomposition becomes perfect: ulet scal = Array.map recip $ takeDiagonal $ adjoint vl <#> vr a == vr <#> diagonal d <#> diagonal scal <#> adjoint vlIf a, is non-diagonalizable then some columns of vr and vl4 are left zero and the above property does not hold.LMNOPQRSTUVWXYZ[\]^_defghLNMOPQRSTUVWXYZ[\]^_defgh4NoneHV7jlapack Zsolve a b == solveDecomposed (decompose a) b solve (covariance u) b == solveDecomposed u bllapackCholesky decompositionijklmNoneijklmijklm5NoneHVolapack Zsolve a b == solveDecomposed (decompose a) b solve (covariance u) b == solveDecomposed u bplapackCholesky decompositionnopqNoneKnopqnopq6NoneHVrRs7None,HV,tuvwNone,zlapack (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. This is because the eigenvectors are not normalized. With the following scaling, the decomposition becomes perfect: klet scal = Array.map recip $ takeDiagonal $ vlAdj <#> vr a == vr <#> diagonal d <#> diagonal 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.=6     tuvwxyz=6     tuvwxyz8None,HVSlapacklThere is no solver for indefinite matrices. Thus the instance will fail for indefinite but solvable systems.{|}~ NoneHUV 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.covariance a instead.lapack&Square matrices will be classified as .lapackEThe number of rows must be maintained by the height mapping function.lapackGThe number of columns must be maintained by the width mapping function.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.lapackadaptOrder x y contains the data of y with the layout of x.lapack DtensorProduct order x y = singleColumn order x <#> singleRow order ylapack <outer order x y = tensorProduct order x (Vector.conjugate y)^DEFGHIJK{|}~^KJDEFGHI}~{|32NoneHVt   NoneHUV" !"rs" !rsNone,HVH09Nonelapack+The pivot array must be at most as long as  Shape.size sh.TUVWXYZ[\NoneM  :NoneHV=lapack FHH.minimumNorm (HH.fromMatrix a) b == Ortho.minimumNorm (adjoint a) b !]^_`abcdefghiNoneNoneHVlapackIf 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\Gramian determinant - works also for non-square matrices, but is sensitive to transposition. CdeterminantAbsolute a = sqrt (Herm.determinant (Herm.covariance 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) aP 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.NonelapackLowerUpper.fromMatrix a) computes the LU decomposition of matrix a with row pivotisation.You can reconstruct a from lu depending on wether a is tall or wide. {LU.multiplyP False lu $ LU.extractL lu <#> LU.tallExtractU lu LU.multiplyP False lu $ LU.wideExtractL lu <#> LU.extractU lulapack Caution: LU.determinant . LU.fromMatrix! will fail for singular matrices. lapackwideMultiplyL transposed lu a multiplies the square part of lu- containing the lower triangular matrix with a. twideMultiplyL False lu a == wideExtractL lu <#> a wideMultiplyL True lu a == wideExtractL (Tri.transposeUp lu) <#> a lapacktallMultiplyU transposed lu a multiplies the square part of lu- containing the upper triangular matrix with a. vtallMultiplyU False lu a == tallExtractU lu <#> a tallMultiplyU True lu a == tallExtractU (Tri.transposeDown lu) <#> a          j;<=>?@ABCDEFGHIJKLMNOPQRSTUV>?WXYZZ[\]^_`abcdefgghijklmnopqrstuvvwwxxyz{|}}~*U./*-./>?        L N I J xX""""""r"o"""X""""""""""""""" " " " " """""""""""""""""""U"""%r%%%*%%g%%%%%%X%%%%%%% %!%+&}&&&&&&&"&&U&&#&$&%&&&'& &(&)'*'+',(Z(((((-(.((((($)/)0)1)2)3)4))0500+060708000X00090:0;000<00U0= > ?>?3*3+3, > ?4*4@4+4A4,5*5@5A5,6*6,7*7+7B7,5>?8C8+8D8*8E F 7 8  G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f  g h i j k l m n o p # $qrstAuvwx > ?yz{|}~9999,99X999:*:::::::,:t:::::::::::wx,t**,F**V/Q*RSTF./GHXWF      !"#$%&'()*+,--.//01123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYYZ[[\rr]^^_QQ`33abcdefghijklmno"pqrstu qAvGHw x y I z!j!U!*!+!{!,##|#}#~####+######$q$A&)))))))))))))))))j1q1A2q2A68999999999:::::F:|:Y::::::%lapack-0.2.3.1-EvecuUZNQEm4FXmYrIYb3mNumeric.LAPACK.Matrix.Shape.BoxNumeric.LAPACK.ScalarNumeric.LAPACK.Matrix.ExtentNumeric.LAPACK.Matrix.Shape Numeric.LAPACK.Matrix.TriangularNumeric.LAPACK.ShapeStaticNumeric.LAPACK.Permutation%Numeric.LAPACK.Orthogonal.HouseholderNumeric.LAPACK.Matrix.HermitianNumeric.LAPACK.MatrixNumeric.LAPACK.Matrix.SquareNumeric.LAPACK.VectorNumeric.LAPACK.Matrix.Banded%Numeric.LAPACK.Matrix.BandedHermitian/Numeric.LAPACK.Matrix.HermitianPositiveDefinite5Numeric.LAPACK.Matrix.BandedHermitianPositiveDefiniteNumeric.LAPACK.SingularNumeric.LAPACK.FormatNumeric.LAPACK.Orthogonal Numeric.LAPACK.Linear.LowerUpper!Numeric.LAPACK.Matrix.Extent.KindNumeric.LAPACK.Wrapper$Numeric.LAPACK.Matrix.Extent.Private#Numeric.LAPACK.Matrix.Shape.PrivateNumeric.LAPACK.PrivateNumeric.LAPACK.Matrix.Private'Numeric.LAPACK.Matrix.Hermitian.Private(Numeric.LAPACK.Matrix.Triangular.Private"Numeric.LAPACK.Matrix.Square.EigenNumeric.LAPACK.Matrix.IndexedNumeric.LAPACK.Matrix.BasicNumeric.LAPACK.Linear.Private'Numeric.LAPACK.Matrix.Symmetric.Private&Numeric.LAPACK.Matrix.Triangular.BasicNumeric.LAPACK.Split&Numeric.LAPACK.Matrix.Triangular.Eigen"Numeric.LAPACK.Matrix.Banded.Basic%Numeric.LAPACK.Matrix.Hermitian.Basic&Numeric.LAPACK.Matrix.Hermitian.Linear+Numeric.LAPACK.Matrix.BandedHermitian.BasicNumeric.LAPACK.Matrix.MultiplySquaretoFullMatrixfromFullgeneralizeTallgeneralizeWide"Numeric.LAPACK.Matrix.Square.Basic%Numeric.LAPACK.Matrix.Hermitian.Eigen+Numeric.LAPACK.Matrix.BandedHermitian.Eigen#Numeric.LAPACK.Matrix.Square.Linear6Numeric.LAPACK.Matrix.HermitianPositiveDefinite.Linear MultiplyLeft<# MultiplyRight#>size fromGeneral fromScalartoScalar identityFromidentityFromWidthidentityFromHeighttracepower eigenvalues eigensystemsolveDecomposed decomposeinverseGenericInverseSolve solveVector caseTallWide mapHeightmapWidthfromRowsNonEmpty fromRowArrayfromRowsfromColumnsNonEmptyfromColumnArray fromColumnstoRows toColumns toRowArray toColumnArraytakeRow takeColumn takeTopRowstakeBottomRowstakeLeftColumnstakeRightColumnstakeRowsdropRows takeColumns dropColumns takeEqually dropEquallyswapRows swapColumns reverseRowsreverseColumns takeRowArraytakeColumnArray fromRowMajor toRowMajorflatten|||===rowSums columnSumsscaleRowsComplexscaleColumnsComplex scaleRowsRealscaleColumnsReal tensorProductvalues valuesTall valuesWidedeterminantAbsolute decomposeWide decomposeTallleastSquaresMinimumNormRCondpseudoInverseRCond FormatArray formatArrayFormatformat##deflt $fFormat(,,) $fFormat(,) $fFormat[]$fFormatComplex$fFormatDouble $fFormatFloat $fFormatInt$fFormatArrayBandedHermitian$fFormatArrayBanded$fFormatArrayHermitian$fFormatArraySplit$fFormatArrayFull$fFormatArrayOneBased$fFormatArrayZeroBased $fFormatArray$fFormatArrayTriangular $fEqSeparator$fOrdSeparator$fShowSeparator Permutation fromPivotstoPivotsnumberFromSigntoMatrixapply Householder fromMatrix leastSquares minimumNormextractQ tallExtractQ tallMultiplyQtallMultiplyQAdjoint multiplyQextractR tallExtractR tallMultiplyR tallSolveR householder complement LowerUpperextractP multiplyPextractL wideExtractL wideMultiplyL wideSolveLextractU tallExtractU tallMultiplyU tallSolveUmultiplyFullRight$fFormatLowerUpper$fShowLowerUpper wideWidth wideHeight tallWidth tallHeight generalWidth generalHeightFlipgetFlipUnifygetUnifyMultiplyTagLawgetMultiplyTagLawTagFactFusegetFuseGeneralTallWide switchTagGTWAdaptgetAdaptWidengetWidenEqualgetEqual Transpose getTransposeAccessor getAccessor GenToWide getGenToWide GenToTall getGenToTallGenWide getGenWideGenTall getGenTall GenSquare getGenSquare CaseTallWidegetCaseTallWide Dimensions extentDim extentDir switchTagPair genSquare genToTall genToWidesquareFromGeneralshowsPrecSquare showsPrecAnywidenreduceWideHeightreduceConsistentmultiplyTagLaw heightFact widthFact unifyLeft unifyRightConst2 getConst2UpLoSymC switchUpLoSymUpLoSym DiagUpLoCswitchDiagUpLoUpLoC switchUpLo switchContentFilledEmpty splitExtent splitOrder splitLowertransposeFromOrderswapOnRowMajorsideSwapFromOrder fullIndicesfullIndexFromOffset fullMapExtent splitHeight splitWidthsplitMapExtentcaseTallWideSplit splitPart uploFromOrder caseTriDiagcharFromTriDiagloweruppertriangularTranspose autoContent uploOrder getConstAs caseContentcaseLoUpcaseDiagUpLoSymgetContentConst2 caseUpLoSymtriangleRootDoubletriangleExtenttriangleIndicestriangleOffsettriangleUncheckedOffsettriangleSizeOffsettriangleUncheckedSizeOffsettriangleIndexFromOffset bandedHeight bandedWidthbandedMapExtent bandedBreadthnumOffDiagonals natFromProxybandedTranspose outsideOffset bandedOffsetbandedIndicesRowMajorbandedIndexFromOffsetbandedHermitianIndexFromOffsetconjugateToTemp copySubMatrixcopyToColumnMajorLACGVgetLACGVSumrunSum CopyToTemp runCopyToTempfill copyBlock copyToTempcomplexConjugateToTemp copyConjugatecopyCondConjugatecondConjugateToTempcopyCondConjugateToTempcopySubTrapezoidcopyTransposedcopyToSubColumnMajor pointerSeqcreateHigherArraysumReal sumComplexlacgvgemvgbmv initializeMVmultiplyMatrixwithAutoWorkspaceInfowithAutoWorkspacewithInfoargMsg errorCodeMsgrankMsg definiteMsgeigenMsgpokeCIntpeekCInt ceilingSize argGeneral argSquaretransposeOrder flipInversion'netlib-ffi-0.1.1-EXFi4rvMjvM90RQzzanS6eNumeric.Netlib.ClassFloating DeterminantgetDeterminant TakeDiagonalrunTakeDiagonal runDiagonalPowergetPowergetMapgetMultiplyRight FlexDiagonaldiagonalPointersdiagonalPointerPairscolumnMajorPointersrowMajorPointers forPointerscopyTriangleToTemp unpackToTempunpackpackpackRect _unpackZero unpackZero fillTriangle copyTriangleA copyTriangleC copyRectanglecaseTriDiagArraymultiplyDiagonal fromBanded checkedZero forceRowMajorsolverwithDeterminantInfo diagonalMsgblockDiagonalPointers determinantRoddPermutationdropEvenextractTrianglemultiplyTriangularsolveTriangular _addAdjointmultiplyColumnMajorMultiplyTriangularConformgetMultiplyTriangularConformComposedTriangularMultipliedDiagMultipliedPartMultipliedTriangularMultiplyTriangular MultipliedmultiplyVectorUnchecked unifyFactorsmultiplyTriangularToSquaremultiplyTriangularConformsolveColumnMajor$fSolveBandedHermitianSignNegativePositiveswapElem transposeIOpeek1poke1split_tau_extent_addRows extractQAuxtransposeFromInversioninvChar asFuncTypeOf inverseChar