!71^      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]>Wrapper around matrix that adds matrix sizes to the type-level(c) Wanja Chresta, 2018BSD-3!wanja dot hs at chrummibei dot ch experimentalPOSIXNone.456@AHMUVXk.S matrix-static+A column vector (a matrix with one column). matrix-static%A row vector (a matrix with one row). matrix-staticA matrix over the type f with m rows and n! columns. This just wraps the 5 constructor and adds size information to the type matrix-static5Apply a map function to the unsafe inner matrix type. matrix-staticATransform a binary unstatic function to a binary static function. matrix-staticMForget static information about a matrix. This converts this converts the  type to Data.Matrix.Matrix matrix-staticDisplay a matrix as a ^ using the _ instance of its elements.  matrix-static O(rows*cols) . Similar to `<. It copies the matrix content dropping any extra memory.Useful when using 2 from a big matrix.  matrix-staticFlatten a matrix of matrices.  matrix-static O(rows*cols)t. Map a function over a row. The bounds of the row parameter is not checked and might throw an error. Example:  ( 1 2 3 ) ( 1 2 3 ) ( 4 5 6 ) ( 5 6 7 ) mapRowUnsafe (\_ x -> x + 1) 2 ( 7 8 9 ) = ( 7 8 9 )  matrix-static O(rows*cols)]. Map a function over a row. The row to map is given by a TypeLevel Nat. To use this, use  -XDataKinds and -XTypeApplications . Example:  ( 1 2 3 ) ( 1 2 3 ) ( 4 5 6 ) ( 5 6 7 ) mapRow @2 (\_ x -> x + 1) ( 7 8 9 ) = ( 7 8 9 )  matrix-static O(rows*cols)w. Map a function over a column. The bounds of the row parameter is not checked and might throw an error. Example:  ( 1 2 3 ) ( 1 3 3 ) ( 4 5 6 ) ( 4 6 6 ) mapColUnsafe (\_ x -> x + 1) 2 ( 7 8 9 ) = ( 7 9 9 ) matrix-static O(rows*cols)`. Map a function over a column. The row to map is given by a TypeLevel Nat. To use this, use  -XDataKinds and -XTypeApplications . Example:  ( 1 2 3 ) ( 1 3 3 ) ( 4 5 6 ) ( 4 6 6 ) mapCol @2 (\_ x -> x + 1) ( 7 8 9 ) = ( 7 9 9 ) matrix-static O(rows*cols)+. Map a function over elements. Example:  ( 1 2 3 ) ( 0 -1 -2 ) ( 4 5 6 ) ( 1 0 -1 ) mapPos (\(r,c) _ -> r - c) ( 7 8 9 ) = ( 2 1 0 )Only available when used with matrix >= 0.3.6! matrix-static O(rows*cols). The zero matrix This produces a zero matrix of the size given by the type. Often, the correct dimensions can be inferred by the compiler. If you want a specific size, give a type. &zero :: Matrix 2 2 Int ( 0 0 ) ( 0 0 ) matrix-static O(rows*cols)g. Generate a matrix from a generator function. | The elements are 1-indexed, i.e. top-left element is (1,1). Example of usage: Jmatrix (\(i,j) -> 2*i - j) :: Matrix 2 4 Int ( 1 0 -1 -2 ) ( 3 2 1 0 ) matrix-static O(rows*cols). Identity matrix hidentitiy @n = ( 1 0 0 ... 0 0 ) ( 0 1 0 ... 0 0 ) ( ... ) ( 0 0 0 ... 1 0 ) ( 0 0 0 ... 0 1 ) matrix-static Similar to  diagonalList , but using aB, which should be more efficient. The size of the vector is not@ checked and will lead to an exception if it's not of size n. matrix-static Similar to  diagonalList , but using aB, which should be more efficient. The size of the vector is not@ checked and will lead to an exception if it's not of size n. matrix-staticNCreate a matrix from a list of elements. The list must have exactly length n*m( or this returns Nothing. An example: VfromList [1..9] :: Maybe (Matrix 3 3 Int) Just ( 1 2 3 ) ( 4 5 6 ) ( 7 8 9 ) matrix-static]Create a matrix from a non-empty list given the desired size. The list must have at least  rows*cols elements. An example: EfromListUnsafe [1..9] :: Matrix 3 3 Int ( 1 2 3 ) ( 4 5 6 ) ( 7 8 9 ) matrix-static@Create a matrix from a list of rows. The list must have exactly m lists of length n+. Nothing is returned otherwise Example: hfromLists [ [1,2,3] ( 1 2 3 ) , [4,5,6] ( 4 5 6 ) , [7,8,9] ] = ( 7 8 9 ) matrix-static@Create a matrix from a list of rows. The list must have exactly m lists of length n. If this does not hold, the resulting Matrix will have different static dimensions that the runtime dimension and will result in hard to debug errors. Use $ whenever you're unsure. Example: zfromListsUnsafe [ [1,2,3] ( 1 2 3 ) , [4,5,6] ( 4 5 6 ) , [7,8,9] ] = ( 7 8 9 ) matrix-static.Get the elements of a matrix stored in a list. ; ( 1 2 3 ) ( 4 5 6 ) toList ( 7 8 9 ) = [1..9] matrix-staticqGet the elements of a matrix stored in a list of lists, where each list contains the elements of a single row. [ ( 1 2 3 ) [ [1,2,3] ( 4 5 6 ) , [4,5,6] toLists ( 7 8 9 ) = , [7,8,9] ] matrix-staticO(1)). Represent a vector as a one row matrix.b matrix-staticO(1)). Represent a vector as a one row matrix. matrix-staticO(1)). Represent a vector as a one row matrix.c matrix-staticO(1)). Represent a vector as a one row matrix. matrix-static O(rows*cols)W. Permutation matrix. The parameters are given as type level Nats. To use this, use  -XDataKinds and -XTypeApplicationsq. The first type parameter gives the matrix' size, the two following give the rows (or columns) to permute. SpermMatrix @n @i @j = i j n 1 ( 1 0 ... 0 ... 0 ... 0 0 ) 2 ( 0 1 ... 0 ... 0 ... 0 0 ) ( ... ... ... ) i ( 0 0 ... 0 ... 1 ... 0 0 ) ( ... ... ... ) j ( 0 0 ... 1 ... 0 ... 0 0 ) ( ... ... ... ) ( 0 0 ... 0 ... 0 ... 1 0 ) n ( 0 0 ... 0 ... 0 ... 0 1 )When i == j it reduces to  n. matrix-static O(rows*cols). Permutation matrix. The values of the row and column identifiers are not checked and if they are out of range (not between 1 and n) an exception will be thrown. WpermMatrixUnsafe @n i j = i j n 1 ( 1 0 ... 0 ... 0 ... 0 0 ) 2 ( 0 1 ... 0 ... 0 ... 0 0 ) ( ... ... ... ) i ( 0 0 ... 0 ... 1 ... 0 0 ) ( ... ... ... ) j ( 0 0 ... 1 ... 0 ... 0 0 ) ( ... ... ... ) ( 0 0 ... 0 ... 0 ... 1 0 ) n ( 0 0 ... 0 ... 0 ... 0 1 )When i == j it reduces to  n. matrix-staticO(1)1. Get an element of a matrix. Indices range from (1,1) to (m,n)C. The parameters are given as type level Nats. To use this, use  -XDataKinds and -XTypeApplications.$The type parameters are: row, columnExample: / ( 1 2 ) getElem @2 @1 ( 3 4 ) = 3  matrix-staticO(1). Unsafe variant of !. This will do no bounds checking! matrix-staticShort alias for  =. Careful: This has no bounds checking This deviates from  Data.Matrix), where (!) does check bounds on runtime." matrix-static>Alias for '(!)'. This exists to keep the interface similar to  Data.Matrix; but serves no other purpose. Use '(!)' (or even better  ) instead.# matrix-static Variant of  ( that returns Maybe instead of an error.$ matrix-static Variant of +( that returns Maybe instead of an error.% matrix-staticO(1)i. Get a row of a matrix as a vector. The range of the input is not checked and must be between 1 and m& matrix-staticO(1)l. Get a column of a matrix as a vector. The range of the input is not checked and must be between 1 and n' matrix-static Varian of %K that returns a maybe instead of an error Only available when used with matrix >= 0.3.6!( matrix-static Variant of &K that returns a maybe instead of an error Only available when used with matrix >= 0.3.6!) matrix-staticO(min rows cols). Diagonal of a not necessarily square matrix.* matrix-static O(rows*cols). Transform a  to a a of size  rows*cols?. This is equivalent to get all the rows of the matrix using %0 and then append them, but far more efficient.+ matrix-staticxReplace the value of a cell in a matrix. The position to be replaced is given by TypeLevel Nats. To use this, use  -XDataKinds and -XTypeApplications.Example: setElem 1 2 0 (1 2 3) = (1 0 3), matrix-staticUnsafe variant of +, without bounds checking.- matrix-static O(rows*cols)(. The transpose of a matrix. Example: _ ( 1 2 3 ) ( 1 4 7 ) ( 4 5 6 ) ( 2 5 8 ) transpose ( 7 8 9 ) = ( 3 6 9 ). matrix-static O(rows^4)L. The inverse of a square matrix Uses naive Gaussian elimination formula./ matrix-staticO(rows*rows*cols*cols). Converts a matrix to reduced row echelon form, thus solving a linear system of equations. This requires that (cols > rows) if cols < rows, then there are fewer variables than equations and the problem cannot be solved consistently. If rows = cols, then it is basically a homogenous system of equations, so it will be reduced to identity or an error depending on whether the marix is invertible (this case is allowed for robustness).0 matrix-staticExtend a matrix to the expected size adding a default element. If the matrix already has the required size, nothing happens. Example:  ( 1 2 3 0 0 ) ( 1 2 3 ) ( 4 5 6 0 0 ) ( 4 5 6 ) ( 7 8 9 0 0 ) extendTo @4 @5 0 ( 7 8 9 ) = ( 0 0 0 0 0 )1 matrix-static}Set the size of a matrix to given parameters. Use a default element for undefined entries if the matrix has been extended.2 matrix-staticO(1). Extract a submatrix from the given position. The type parameters expected are the starting and ending indices of row and column elements.3 matrix-staticO(1). Extract a submatrix from the given position. The type parameters are the dimension of the returned matrix, the run-time indices are the indiced of the top-left element of the new matrix. Example:  ( 1 2 3 ) ( 4 5 6 ) ( 2 3 ) submatrixUnsafe @2 @2 1 2 ( 7 8 9 ) = ( 5 6 )4 matrix-static O(rows*cols)6. Remove a row and a column from a matrix. Example: s ( 1 2 3 ) ( 4 5 6 ) ( 1 3 ) minorMatrixUnsafe 2 2 ( 7 8 9 ) = ( 7 9 )5 matrix-static O(rows*cols)6. Remove a row and a column from a matrix. Example: g ( 1 2 3 ) ( 4 5 6 ) ( 1 3 ) minorMatrix @2 @2 ( 7 8 9 ) = ( 7 9 )6 matrix-staticO(1). Make a block-partition of a matrix using a given element as reference. The element will stay in the bottom-right corner of the top-left corner matrix. This means, the ranges of the pivot elements positions are  i <- [1..m-1], j <- [1..n-1]   ( ) ( TR | TL ) ( ) ( ... | ... ) ( x ) ( x | ) splitBlocks @i @j ( ) = (-------------) , where x = a_{i,j} ( ) ( BL | BR ) ( ) ( ... | ... ) ( ) ( | )Note that contrary to the matrix version of this function, blocks will never be empty. Also, because of TypeLits not providing proper dependent types, there is no way to have a type safe variant of this functon where the pivot element is given at run-time.7 matrix-static$Join blocks of the form detailed in 6 . Precisely: @joinBlocks (tl,tr,bl,br) = (tl <|> tr) <-> (bl <|> br)8 matrix-static)Horizontally join two matrices. Visually: ( A ) <|> ( B ) = ( A | B )9 matrix-static)Horizontally join two matrices. Visually: G ( A ) ( A ) <-> ( B ) = ( - ) ( B ): matrix-static2Type safe matrix multiplication This is called (*) in matrixe. Since the dimensions of the input matrices differ, they are not the same type and we cannot use Num's (*); matrix-staticType safe scalar multiplication< matrix-static0Perform an operation element-wise. This uses matrix's elementwiseUnsafe= since we can guarantee proper dimensions at compile time.= matrix-static-Standard matrix multiplication by definition.> matrix-static-Standard matrix multiplication by definition.? matrix-static!Strassen's matrix multiplication.@ matrix-static'Mixed Strassen's matrix multiplication.A matrix-static-Scale a matrix by a given factor. Example: t ( 1 2 3 ) ( 2 4 6 ) ( 4 5 6 ) ( 8 10 12 ) scaleMatrix 2 ( 7 8 9 ) = ( 14 16 18 )B matrix-staticUScale a row by a given factor. The input row is not checked for validity. Example:  ( 1 2 3 ) ( 1 2 3 ) ( 4 5 6 ) ( 12 15 18 ) scaleRowUnsafe 3 2 ( 7 8 9 ) = ( 7 8 9 )C matrix-staticUScale a row by a given factor. The input row is not checked for validity. Example: t ( 1 2 3 ) ( 1 2 3 ) ( 4 5 6 ) ( 12 15 18 ) scaleRow @2 3 ( 7 8 9 ) = ( 7 8 9 )D matrix-static<Add to one row a scalar multiple of another row. Example:  ( 1 2 3 ) ( 1 2 3 ) ( 4 5 6 ) ( 6 9 12 ) combineRowsUnsafe 2 2 1 ( 7 8 9 ) = ( 7 8 9 )E matrix-static<Add to one row a scalar multiple of another row. Example:  ( 1 2 3 ) ( 1 2 3 ) ( 4 5 6 ) ( 6 9 12 ) combineRows @2 @1 2 ( 7 8 9 ) = ( 7 8 9 )F matrix-static`Switch two rows of a matrix. The validity of the input row numbers is not checked Example:  ( 1 2 3 ) ( 4 5 6 ) ( 4 5 6 ) ( 1 2 3 ) switchRowsUnsafe 1 2 ( 7 8 9 ) = ( 7 8 9 )G matrix-static(Switch two rows of a matrix. Example: t ( 1 2 3 ) ( 4 5 6 ) ( 4 5 6 ) ( 1 2 3 ) switchRows @1 @2 ( 7 8 9 ) = ( 7 8 9 )H matrix-staticfSwitch two coumns of a matrix. The validity of the input column numbers is not checked. Example:  ( 1 2 3 ) ( 2 1 3 ) ( 4 5 6 ) ( 5 4 6 ) switchColsUnsafe 1 2 ( 7 8 9 ) = ( 8 7 9 )I matrix-static*Switch two coumns of a matrix. Example: t ( 1 2 3 ) ( 2 1 3 ) ( 4 5 6 ) ( 5 4 6 ) switchCols @1 @2 ( 7 8 9 ) = ( 8 7 9 )J matrix-staticMatrix LU decomposition with partial pivoting. The result for a matrix M is given in the format  (U,L,P,d) where:U is an upper triangular matrix.L is an unit lower triangular matrix.P is a permutation matrix.d is the determinant of P.PM = LU.These properties are only guaranteed when the input matrix is invertible. An additional property matches thanks to the strategy followed for pivoting:L_(i,j) <= 1, for all i,j.This follows from the maximal property of the selected pivots, which also leads to a better numerical stability of the algorithm.Example:  ( 1 2 0 ) ( 2 0 2 ) ( 1 0 0 ) ( 0 0 1 ) ( 0 2 1 ) ( 0 2 -1 ) ( 1/2 1 0 ) ( 1 0 0 ) luDecomp ( 2 0 2 ) = ( ( 0 0 2 ) , ( 0 1 1 ) , ( 0 1 0 ) , 1 )d+ is returned if no LU decomposition exists.K matrix-staticUnsafe version of J-. It fails when the input matrix is singular.L matrix-staticMatrix LU decomposition with complete pivoting. The result for a matrix M is given in the format  (U,L,P,Q,d,e) where:U is an upper triangular matrix.L is an unit lower triangular matrix.P,Q are permutation matrices.d,e are the determinants of P and Q respectively.PMQ = LU.These properties are only guaranteed when the input matrix is invertible. An additional property matches thanks to the strategy followed for pivoting:L_(i,j) <= 1, for all i,j.This follows from the maximal property of the selected pivots, which also leads to a better numerical stability of the algorithm.Example:  ( 1 0 ) ( 2 1 ) ( 1 0 0 ) ( 0 0 1 ) ( 0 2 ) ( 0 2 ) ( 0 1 0 ) ( 0 1 0 ) ( 1 0 ) luDecomp' ( 2 1 ) = (( 0 0 ), ( 1/2 -1/4 1 ), ( 1 0 0 ), ( 0 1 ), -1 , 1 )d+ is returned if no LU decomposition exists.M matrix-staticUnsafe version of L-. It fails when the input matrix is singular.N matrix-staticcSimple Cholesky decomposition of a symmetric, positive definite matrix. The result for a matrix M is a lower triangular matrix L such that:M = LL^T.Example:  ( 2 -1 0 ) ( 1.41 0 0 ) ( -1 2 -1 ) ( -0.70 1.22 0 ) cholDecomp ( 0 -1 2 ) = ( 0.00 -0.81 1.15 )O matrix-static.Sum of the elements in the diagonal. See also ) . Example: 4 ( 1 2 3 ) ( 4 5 6 ) trace ( 7 8 9 ) = 15P matrix-static2Product of the elements in the diagonal. See also ) . Example: = ( 1 2 3 ) ( 4 5 6 ) diagProd ( 7 8 9 ) = 45Q matrix-staticFMatrix determinant using Laplace expansion. If the elements of the  are instance of e and f consider to use R4 in order to obtain better performance. Function Q is  extremely slow.R matrix-static^Matrix determinant using LU decomposition. It works even when the input matrix is singular.  matrix-static9Function takes the current column as additional argument. matrix-static Row to map.  matrix-static9Function takes the current column as additional argument.  matrix-static9Function takes the current column as additional argument. matrix-static Row to map. matrix-static9Function takes the current column as additional argument. matrix-static;Function takes the current Position as additional argument. matrix-staticGenerator function matrix-staticDefault element matrix-staticDiagonal vector matrix-staticDefault element matrix-staticDiagonal vector matrix-staticList of elements matrix-staticPermuted row 1. matrix-staticPermuted row 2. matrix-staticPermutation matrix. matrix-staticMatrix  matrix-staticRow matrix-staticColumn matrix-staticMatrix+ matrix-static New value. matrix-staticOriginal matrix. matrix-static=Matrix with the given position replaced with the given value., matrix-static New value. matrix-staticPosition to replace. matrix-staticOriginal matrix. matrix-static=Matrix with the given position replaced with the given value.0 matrix-staticElement to add when extending.1 matrix-staticDefault element.3 matrix-static Starting row matrix-staticStarting column4 matrix-staticRow r to remove. matrix-staticColumn c to remove. matrix-staticOriginal matrix. matrix-staticMatrix with row r and column c removed.5 matrix-staticOriginal matrix. matrix-staticMatrix with row r and column c removed.6 matrix-staticMatrix to split. matrix-static (TL,TR,BL,BR)F matrix-staticRow 1. matrix-staticRow 2. matrix-staticOriginal matrix. matrix-static"Matrix with rows 1 and 2 switched.G matrix-staticOriginal matrix. matrix-static"Matrix with rows 1 and 2 switched.H matrix-staticCol 1. matrix-staticCol 2. matrix-staticOriginal matrix. matrix-static"Matrix with cols 1 and 2 switched.I matrix-staticOriginal matrix. matrix-static"Matrix with cols 1 and 2 switched.S  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS ! "#$%&'()*:;+,-10./  23546897<=>?@ACBEDGFIHJKLMNOPQR Safe1tghijklmno      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcadefghfgijkalmnopaqrstuvwxyz{*matrix-static-0.2.1-1yQOE4ja8DF43P9TWpenSrData.Matrix.StaticPaths_matrix_static ColumnVector RowVectorMatrixnrowsncols applyUnary applyBinary unpackStatic prettyMatrix forceMatrixflatten mapRowUnsafemapRow mapColUnsafemapColmapPoszeromatrixidentitydiagonalUnsafediagonalfromListfromListUnsafe fromListsfromListsUnsafetoListtoLists rowVector colVector permMatrixpermMatrixUnsafegetElem unsafeGet!!.safeGetsafeSetgetRowgetCol safeGetRow safeGetColgetDiaggetMatrixAsVectorsetElem unsafeSet transposeinverserrefextendTosetSize submatrixsubmatrixUnsafeminorMatrixUnsafe minorMatrix splitBlocks joinBlocks<|><->.*^* elementwisemultStdmultStd2 multStrassenmultStrassenMixed scaleMatrixscaleRowUnsafescaleRowcombineRowsUnsafe combineRowsswitchRowsUnsafe switchRowsswitchColsUnsafe switchColsluDecompluDecompUnsafe luDecomp'luDecompUnsafe' cholDecomptracediagProd detLaplacedetLU $fNumMatrix $fOrdMatrix $fShowMatrix$fSemigroupMatrix $fEqMatrix$fFunctorMatrix$fApplicativeMatrix$fFoldableMatrix$fTraversableMatrix$fMonoidMatrix$fNFDataMatrixbaseGHC.BaseStringGHC.ShowShow&vector-0.12.0.3-ChzWbiXyvuNAQj0dcU08Sg Data.VectorforceVectorrowVectorUnsafecolVectorUnsafe GHC.MaybeNothingghc-prim GHC.ClassesOrdGHC.Real Fractionalversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName