jMde      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdNone 6<    None 'Mutable matrix. You can modify elementse*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.e !"#$%&' !"#$%&' #$%&!"' e !"#$%&'None(1Sets the max number of threads reserved for Eigen)1Gets the max number of threads reserved for Eigen()()()()None6HM.*MMatrix class to be used in pure computations, uses column major memory layout/Empty 0x0 matrix0Is matrix empty?1Is matrix square?23Matrix where all coeffs are filled with given value3Matrix where all coeff are 04Matrix where all coeff are 155Square matrix with 1 on main diagonal and 0 elsewhere6Number of rows for the matrix7 Number of columns for the matrixfMtrix size as (rows, cols) pair8*Matrix coefficient at specific row and col9*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 matrixATop n rows of matrixBBottom n rows of matrixCLeft n columns of matrixDRight n columns of matrixEvConstruct matrix from a list of rows, column count is detected as maximum row length. Missing values are filled with 0F Convert matrix to a list of rowsG=Create matrix using generator function f :: row -> col -> valHFor 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.IFor 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.JThe determinant of the matrixK@Adding two matrices by adding the corresponding entries togetherL Return a + bMMatrix multiplication Khttp://upload.wikimedia.org/math/7/3/f/73fc7ef1bf6f6822115c41cff58535e1.pngNInverse of the matrixiFor small fixed sizes up to 4x4, this method uses cofactors. In the general case, this method uses class  PartialPivLUOAdjoint of the matrixPTranspose of the matrixQConjugate of the matrixR*Nomalize the matrix by deviding it on its HSApply 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.T-Yield an immutable copy of the mutable matrixU,Yield a mutable copy of the immutable matrixV}Unsafe convert a mutable matrix to an immutable one without copying. The mutable matrix may not be used after this operation.WUnsafely convert an immutable matrix to a mutable one without copying. The immutable matrix may not be used after this operation.XgPass a pointer to the matrix's data to the IO action. The data may not be modified through the pointer.gNm instance for the matrixhPretty prints the matrix5*+,-./01234567f89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXijkgh/*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX/*+,-.>EFG/0134527689:@?;<=ABCDHIJKLMNOQPRSUTWVX1*+,-./01234567f89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXijkghNone  Y Decomposition Requirements on the matrix Speed Accuracy PartialPivLU Invertible ++ + FullPivLU None - +++ HouseholderQR None ++ + ColPivHouseholderQR None + ++ FullPivHouseholderQR None - +++ LLT Positive definite +++ + LDLT Positive or negative semidefinite +++ ++ JacobiSVD None - +++ The best way to do least squares solving for square matrices is with a SVD decomposition (JacobiSVD) Z;Two-sided Jacobi SVD decomposition of a rectangular matrix.[8Robust Cholesky decomposition of a matrix with pivoting.\3Standard Cholesky decomposition (LL^T) of a matrix.]KHouseholder rank-revealing QR decomposition of a matrix with full pivoting.^MHouseholder rank-revealing QR decomposition of a matrix with column-pivoting._)Householder QR decomposition of a matrix.`4LU decomposition of a matrix with complete pivoting.a3LU decomposition of a matrix with partial pivoting.b x = solve d a bfinds a solution x of ax = b equation using decomposition dc e = relativeError x a b computes norm (ax - b) / norm b where norm is L2 normd )(coeffs, error) = linearRegression points$computes multiple linear regression #y = a1 x1 + a2 x2 + ... + an xn + b using ^ decompositionpoint format is  [y, x1..xn]coeffs format is  [b, a1..an]error is calculated using c 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) YZ[\]^_`almbcd YZ[\]^_`abcd Ya`_^]\[ZbcdYa`_^]\[Zlmbcdn       !"#$%&'()*+,-.//0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[,\]^_`abcdefgBhijklmnop eigen-1.2.1Data.Eigen.InternalData.Eigen.Matrix.MutableData.Eigen.ParallelData.Eigen.Matrix Data.Eigen.LACastcast c_determinant c_hypotNorm c_blueNorm c_squaredNormc_norm c_normalize c_conjugate c_adjoint c_inverse c_transposec_mulc_subc_addc_getNbThreadsc_setNbThreads c_freeString performIOcall $fCastIntCInt $fCastCIntInt$fCastDoubleCDouble$fCastCDoubleDoubleSTMatrixIOMatrixMMatrixmm_rowsmm_colsmm_valsnew replicatesetcopyreadwrite unsafeRead unsafeWrite unsafeWith setNbThreads getNbThreadsMatrixm_rowsm_colsm_valsemptynullsquareconstantzeroonesidentityrowscols!coeff unsafeCoeffcolrowblockvalidmaxCoeffminCoefftopRows bottomRowsleftCols rightColsfromListtoListgeneratenorm squaredNorm determinantaddsubmulinverseadjoint transpose conjugate normalizemodifyfreezethaw unsafeFreeze unsafeThaw Decomposition JacobiSVDLDLTLLTFullPivHouseholderQRColPivHouseholderQR HouseholderQR FullPivLU PartialPivLUsolve relativeErrorlinearRegressiondims $fNumMatrix $fShowMatrix_prop_binop_unopc_relativeErrorc_solve