z[      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZNone 6<$[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ [\]^_`abcdefghijklmnopqrstuvwxyz#[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None 'Mutable matrix. You can modify elements*Verify matrix dimensions and memory layoutQCreate a mutable matrix of the given size and fill it with 0 as an initial value.OCreate a mutable matrix of the given size and fill it with as an initial value. 1Set all elements of the matrix to the given value NCopy a matrix. The two matrices must have the same length and may not overlap. (Yield the element at the given position. *Replace the element at the given position. HYield the element at the given position. No bounds checks are performed.JReplace the element at the given position. No bounds checks are performed.Pass a pointer to the matrix's data to the IO action. Modifying data through the pointer is unsafe if the matrix could have been frozen before the modification.      None1Sets the max number of threads reserved for Eigen1Gets the max number of threads reserved for EigenNone6HM9GMatrix to be used in pure computations, uses column major memory layoutEmpty 0x0 matrixIs matrix empty?Is matrix square?3Matrix where all coeffs are filled with given valueMatrix where all coeff are 0Matrix where all coeff are 15Square matrix with 1 on main diagonal and 0 elsewhere!The random matrix of a given sizeNumber of rows for the matrix  Number of columns for the matrixMtrix size as (rows, cols) pair!*Matrix coefficient at specific row and col"*Matrix coefficient at specific row and col#PUnsafe version of coeff function. No bounds check performed so SEGFAULT possible$&List of coefficients for the given col%&List of coefficients for the given row&VExtract rectangular block from matrix defined by startRow startCol blockRows blockCols'*Verify matrix dimensions and memory layout()The maximum of all coefficients of matrix))The minimum of all coefficients of matrix*Top n rows of matrix+Bottom n rows of matrix,Left n columns of matrix-Right n columns of matrix.vConstruct matrix from a list of rows, column count is detected as maximum row length. Missing values are filled with 0/ Convert matrix to a list of rows0=Create matrix using generator function f :: row -> col -> val1)The sum of all coefficients of the matrix2-The product of all coefficients of the matrix3*The mean of all coefficients of the matrix4jThe trace of a matrix is the sum of the diagonal coefficients and can also be computed as sum (diagonal m)5iApplied to a predicate and a matrix, all determines if all elements of the matrix satisfies the predicate6hApplied to a predicate and a matrix, any determines if any element of the matrix satisfies the predicate7JReturns the number of coefficients in a given matrix that evaluate to true8For vectors, the l2 norm, and for matrices the Frobenius norm. In both cases, it consists in the square root of the sum of the square of all the matrix entries. For vectors, this is also equals to the square root of the dot product of this with itself.9For vectors, the squared l2 norm, and for matrices the Frobenius norm. In both cases, it consists in the sum of the square of all the matrix entries. For vectors, this is also equals to the dot product of this with itself.:The l2 norm of the matrix using the Blue's algorithm. A Portable Fortran Program to Find the Euclidean Norm of a Vector, ACM TOMS, Vol 4, Issue 1, 1978.;The l2 norm of the matrix avoiding undeflow and overflow. This version use a concatenation of hypot calls, and it is very slow.<The determinant of the matrix=NAdding two matrices by adding the corresponding entries together. You can use (+) function as well.>XSubtracting two matrices by subtracting the corresponding entries together. You can use (-) function as well.?#Matrix multiplication. You can use (*) function as well.@Diagonal of the matrixAInverse of the matrix}For small fixed sizes up to 4x4, this method uses cofactors. In the general case, this method uses PartialPivLU decompositionBAdjoint of the matrixCTranspose of the matrixDConjugate of the matrixE*Nomalize the matrix by deviding it on its 8FApply a destructive operation to a matrix. The operation will be performed in place if it is safe to do so and will modify a copy of the matrix otherwise.G-Yield an immutable copy of the mutable matrixH,Yield a mutable copy of the immutable matrixI}Unsafe convert a mutable matrix to an immutable one without copying. The mutable matrix may not be used after this operation.JUnsafely convert an immutable matrix to a mutable one without copying. The immutable matrix may not be used after this operation.KgPass a pointer to the matrix's data to the IO action. The data may not be modified through the pointer.Nm instance for the matrixPretty prints the matrix@ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK:'./0 !"#$%&*+,-123)(489:;<567=>?@CABDEFHGJIK< !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKNone L TDecomposition Requirements on the matrix Speed Accuracy Rank Kernel Image PartialPivLU Invertible ++ + - - - FullPivLU None - +++ + + + HouseholderQR None ++ + - - - ColPivHouseholderQR None + ++ + - - FullPivHouseholderQR None - +++ + - - LLT Positive definite +++ + - - - LDLT Positive or negative semidefinite +++ ++ - - - JacobiSVD None - +++ + - - ZThe best way to do least squares solving for square matrices is with a SVD decomposition (M)M;Two-sided Jacobi SVD decomposition of a rectangular matrix.N8Robust Cholesky decomposition of a matrix with pivoting.O3Standard Cholesky decomposition (LL^T) of a matrix.PKHouseholder rank-revealing QR decomposition of a matrix with full pivoting.QMHouseholder rank-revealing QR decomposition of a matrix with column-pivoting.R)Householder QR decomposition of a matrix.S4LU decomposition of a matrix with complete pivoting.T3LU decomposition of a matrix with partial pivoting.U x = solve d a bfinds a solution x of ax = b equation using decomposition dV e = relativeError x a b computes norm (ax - b) / norm b where norm is L2 normWThe rank of the matrixX>Return matrix whose columns form a basis of the null-space of AYBReturn a matrix whose columns form a basis of the column-space of AZ )(coeffs, error) = linearRegression points$computes multiple linear regression #y = a1 x1 + a2 x2 + ... + an xn + b using Q decompositionpoint format is  [y, x1..xn]coeffs format is  [b, a1..an]error is calculated using V import Data.Eigen.LA main = print $ linearRegression [ [-4.32, 3.02, 6.89], [-3.79, 2.01, 5.39], [-4.01, 2.41, 6.01], [-3.86, 2.09, 5.55], [-4.10, 2.58, 6.32]] produces the following output V([-2.3466569233817127,-0.2534897541434826,-0.1749653335680988],1.8905965120153139e-3) LMNOPQRSTUVWXYZLMNOPQRSTUVWXYZLTSRQPONMUVWXYZLTSRQPONMUVWXYZ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~+ eigen-1.2.3Data.Eigen.Matrix.MutableData.Eigen.ParallelData.Eigen.Matrix Data.Eigen.LAData.Eigen.InternalSTMatrixIOMatrixMMatrixmm_rowsmm_colsmm_valsnew replicatesetcopyreadwrite unsafeRead unsafeWrite unsafeWith setNbThreads getNbThreadsMatrixm_rowsm_colsm_valsemptynullsquareconstantzeroonesidentityrandomrowscols!coeff unsafeCoeffcolrowblockvalidmaxCoeffminCoefftopRows bottomRowsleftCols rightColsfromListtoListgeneratesumprodmeantraceallanycountnorm squaredNormblueNorm hypotNorm determinantaddsubmuldiagonalinverseadjoint transpose conjugate normalizemodifyfreezethaw unsafeFreeze unsafeThaw Decomposition JacobiSVDLDLTLLTFullPivHouseholderQRColPivHouseholderQR HouseholderQR FullPivLU PartialPivLUsolve relativeErrorrankkernelimagelinearRegressionCastcastc_relativeErrorc_solvec_freec_kernelc_imagec_rank c_determinant c_hypotNorm c_blueNorm c_squaredNormc_tracec_normc_meanc_prodc_sum c_normalize c_conjugate c_adjoint c_inverse c_transpose c_diagonalc_mulc_subc_addc_randomc_getNbThreadsc_setNbThreads c_freeString performIOcall $fCastIntCInt $fCastCIntInt$fCastDoubleCDouble$fCastCDoubleDoubledims $fNumMatrix $fShowMatrix_prop_binop_unop