úÎÁ6¯ ÿ       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ                                 Safe<=DR 9union binary lift : apply function on _union_ of two Sets Gintersection binary lift : apply function on _intersection_ of two Sets inner productmultiplication by a scalarRing zero elementRing +negate the values in a functorsubtract two Additive objectslinear interpolation #`hilbertDistSq x y = || x - y ||^2`!Squared 2-norm"L1 norm#Euclidean norm$Lp norm (p > 0)% Infinity-norm&"Normalize w.r.t. p-norm (p finite)'Lp inner product (p > 0)( Reciprocal)Scale* unary dimension-checking bracket+!binary dimension-checking bracket,  !"#$%&'()*+,  !"#$%&'()*+, !"#$%&'()*+     !"#$%&'()*+Safe ,Insert an element- Lookup a key.BPpopulate an IM2 from a list of (row index, column index, value) /7Indexed left fold over an IM2, with general accumulator0Indexed left fold over an IM21/Left fold over an IM2, with general accumulator2wInner indices become outer ones and vice versa. No loss of information because both inner and outer IntMaps are nubbed.3+Map over outer IM and filter all inner IM's47Specialized filtering : keep only sub-diagonal elements6<List of (row, col) indices of (nonzero) subdiagonal elements8 Map over IM29Indexed map over IM2: Mapping keys,-./0123456789:;<=>?@,-./0123456789:;@?>=<,-./0123456789:;,-./0123456789:;<=>?@SafeA eps = 1e-8 B Rounding ruleC Rounding ruleIKRound to respectively 0 or 1 within some predefined numerical precision eps ABCDEFGHI ABCDEFGHI ABCDEFGHI ABCDEFGHISafeLIComponentwise tuple operations TODO : use semilattice properties insteadMIComponentwise tuple operations TODO : use semilattice properties insteadNinteger-indexed ziplistO ", 2d arraysP foldr over the results of a fmapQstrict left foldRindexed right fold JKLMNOPQRSTUV JKLMNOPQRSTUV LMNOPQRKJSTUV JKLMNOPQRSTUVSafeWXYZWXYZZYXWWXYZSafe9;<=DR_SpVector sparsity`Number of nonzerosb*empty sparse vector (length n, no entries)c"singleton sparse vector (length 1)dQcreate a sparse vector from an association list while discarding all zero entriese3", from logically dense array (consecutive indices)g>Create new sparse vector, assumin 0-based, contiguous indexingh_one-hot encoding : `oneHotSV n k` produces a SpVector of length n having 1 at the k-th positionjDENSE vector of `1`skDENSE vector of `0`slinsert element x at index i in a preexisting SpVectoroTo dense list (default = 0)pLookup an index in a SpVectorq7Lookup an index, return a default value if lookup failsr8Lookup an index in a SpVector, returns 0 if lookup failss Tail elementst Head elementuConcatenate two sparse vectorsvFilterwIndexed filterx*Generate an arbitrary (not random) vector u such that `v dot u = 0`)[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ[\]^_`abcdefghijklmnopqrstuvwx)[\]^_`aƒ‚�€~}|{zbcdefghijklmnoypqrstuvwx&[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒSafe9;<=DR1Ž,`zeroSM m n` : Empty SpMatrix of size (m, n)�"`eye n` : identity matrix of rank n‘¢Permutation matrix from a (possibly incomplete) list of row swaps starting from row 0 e.g. `permutationSM 5 [1,3]` first swaps rows (0, 1) and then rows (1, 3) :  0,1,0,0,0 0,0,0,1,0 0,0,1,0,0 1,0,0,0,0 0,0,0,0,1’xPermutation matrix from a (possibly incomplete) list of row pair swaps e.g. `permutPairs 5 [(2,4)]` swaps rows (2, 4) :  1,0,0,0,0 0,1,0,0,0 0,0,0,0,1 0,0,0,1,0 0,0,1,0,0“9`mkSubDiagonal n o xx` creates a square SpMatrix of size n with xx on the oth subdiagonal”DInsert an element in a preexisting Spmatrix at the specified indices•?Add to existing SpMatrix using data from list (row, col, value)–:Create new SpMatrix using data from list (row, col, value)—ECreate new SpMatrix assuming contiguous, 0-based indexing of elements˜HPopulate list with SpMatrix contents and populate missing entries with 0š`Looks up an element in the matrix with a default (if the element is not found, zero is returned)œ3Zero-default lookup, infix form (no bound checking)`Looks up an element in the matrix with a default (if the element is not found, zero is returned)�^Zero-default lookup, infix form ("safe" : throws exception if lookup is outside matrix bounds)`Looks up an element in the matrix with a default (if the element is not found, zero is returned)žfExtract a submatrix given the specified index bounds, rebalancing keys with the two supplied functionsŸ^Extract a submatrix given the specified index bounds NB : subtracts (i1, j1) from the indices \Extract a submatrix given the specified index bounds NB : submatrix indices are _preserved_¢!Extract column within a row range£1Extract column within a row range, rebalance keys¤Extract all column¥!Extract column within a row range¦1Extract column within a row range, rebalance keys§.Are the supplied indices within matrix bounds?¨Is the matrix square?©Is the matrix diagonal?ª,is the matrix orthogonal? i.e. Q^t ## Q == I«/Data in internal representation (do not export)¬#(Number of rows, Number of columns)­&Number of rows times number of columns®Number of rows¯Number of columns·Vertical stacking¸Vertical stacking¹Horizontal stackingºHorizontal stacking»Left fold over SpMatrix¼Indexed left fold over SpMatrix½Count sub-diagonal nonzeros¾`Filter the index subset that lies below the diagonal (used in the QR decomposition, for example)ÀSparsify an SpMatrixÁ3Round almost-0 and almost-1 to 0 and 1 respectivelyÂ0swap two rows of a SpMatrix (bounds not checked)Ã.swap two rows of a SpMatrix (bounds checked) Ä$transposeSM, (#^) : Matrix transposeÅ$transposeSM, (#^) : Matrix transposeÊRemoves all elements x for which `| x | <= eps`)ËRemoves all elements x for which `| x | <= eps`)ÌA^T BÍA B^TÎ-Contract two matrices A and B up to an index nD, i.e. summing over repeated indices: Aij Bjk , for j in [0 .. n] Q…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕJ…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎQ‰Š‹Œ�ÕÔÓÒÑÐÏŽ��‘’“”•–—˜™šœ�›žŸ ¡¢£¤¥¦§¨©ª«¬­®¯…†‡ˆ°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎK…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕSafeÚAInsert row , using the provided row index transformation functionÛInsert row ÜCInsert column, using the provided row index transformation functionÝ Insert columnàpromote a SV to SMá.Demote (n x 1) or (1 x n) SpMatrix to SpVectorâExtract ith rowãExtract jth columnäGeneric extraction functionåExtract ith row (dense)æExtract jth columnçExtract the diagonalèextract row intervalé>extract row interval, rebalance keys by subtracting lowest oneêextract column intervalëAextract column interval, rebalance keys by subtracting lowest oneìMatrix-on-vectoríMatrix-on-vectorî>Vector-on-matrix (FIXME : transposes matrix: more costly than ì , I think)ï>Vector-on-matrix (FIXME : transposes matrix: more costly than ì , I think)! ÙÚÛÜÝÞßàáâãäåæçèéêëìíîï!"#$%&'ðñÕ  !"#$%&'()*+,-./0123456789:;ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÙÚÛÜÝÞßàáâãäåæçèéêëìíîïÚÛÜÝÞßáàãâäåæçèêéëìíîïÙ  ÙÚÛÜÝÞßàáâãäåæçèéêëìíîï!"#$%&'ðñ None 9:;<=DR#ýSparsify an SpVectorþ+uses the R matrix from the QR factorization a vector xS uniquely defines an orthogonal plane; the Householder operator reflects any point v3 with respect to this plane: v' = (I - 2 x >< x) v(´Givens coefficients (using stable algorithm shown in Anderson, Edward (4 December 2000). "Discontinuous Plane Rotations and the Symmetric Eigenvalue Problem". LAPACK Working Note)zGivens method, row version: choose other row index i' s.t. i' is : * below the diagonal * corresponding element is nonzeroˆQR.C1 ) To zero out entry A(i, j) we must find row k such that A(k, j) is non-zero but A has zeros in row k for all columns less than j.)Is the k'th the first nonzero column in the row?*,Returns a set of rows {k} that satisfy QR.C1EApplies Givens rotation iteratively to zero out sub-diagonal elements+,Givens matrices in order [G1, G2, .. , G_N ]`eigsQR n mm` performs n* iterations of the QR algorithm on matrix mm3, and returns a SpVector containing all eigenvalues`eigsRayleigh n mm` performs n0 iterations of the Rayleigh algorithm on matrix mmž and returns the eigenpair closest to the initialization. It displays cubic-order convergence, but it also requires an educated guess on the initial eigenpair LU factors,First iteration of LU-LU update step.+used for Incomplete LU : remove entries in m" corresponding to zero entries in m2/one step of TFQMR0one step of BCG one step of CGS Hiterate solver until convergence or until max # of iterations is reached one step of BiCGSTAB Hiterate solver until convergence or until max # of iterations is reached1GLeast-squares approximation of a rectangular system of equaitons. Uses  \ for the linear solve KLinear solve with _deterministic_ starting vector (every component at 0.1)  \0 : linSolve using the BiCGSTAB method as default2(transform state until a condition is met30Keep a moving window buffer (length 2) of state xw to assess convergence, stop when either a condition on that list is satisfied or when max # of iterations is reached 0Keep a moving window buffer (length 2) of state xŠ to assess convergence, stop when either a condition on that list is satisfied or when max # of iterations is reached (i.e. same thing as 3& but this one runs in the State monad)4Oiterate until convergence is verified or we run out of a fixed iteration budget5convergence check (FIXME)6run niter! iterations and append the state x to a list xs, stop when either the xs satisfies a predicate q or when the counter reaches 0", NO convergence check Dense SpMatrixDense SpVector Sparse SpMatrixSparse SpVectordò789:;ó<ô=>õ?ö@AB÷CøDEFGùHúIJKLMNOPQRûSüTUýþÿVW()*+X,-YZ[\]^_`a.b/0    1 23cd456$òóôõö÷øùúûüýþÿ     )þÿ ò  üúôöø  ûüùúóôõö÷øý@ò789:;ó<ô=>õ?ö@AB÷CøDEFGù HúIJKLMNOPQRûSüTUýþÿVW()*+X,-YZ[\]^_`a.b/0    1 23cd456e     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž���‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùú û ü ý þ ÿ                                  ! " # $ % & ' ()*+,-./0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D ü E F þ 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 hi3sparse-linear-algebra-0.2.0.8-AONXvZKRZ04WoLdFjoiv5Numeric.LinearAlgebra.Class#Numeric.LinearAlgebra.Sparse.IntMap Numeric.EpsData.Sparse.UtilsData.Sparse.TypesData.Sparse.SpVectorData.Sparse.SpMatrixData.Sparse.CommonNumeric.LinearAlgebra.Sparse IxContainerIx ixcLookupixcLookupDefault ixcFilter ixcIfilter ixcInsert ixcFromList ixcToListSetliftU2liftI2SparsespyHasDataHDDatadat FiniteDimFDSizedimNormednormHilbertdot VectorSpace.*Additivezero^+^negated^-^lerp hilbertDistSqnormSqnorm1norm2normP normInfty normalizedotLp reciprocalscalewithDimwithDim2 insertIM2 lookupIM2 fromListIM2 ifoldlIM2' ifoldlIM2foldlIM2 transposeIM2 ifilterIM2 filterSubdiagcountSubdiagonalNZsubdiagIndicesrpairsmapIM2imapIM2 mapKeysIM2 mapColumnIM2$fNormedIntMap$fHilbertIntMap$fVectorSpaceIntMap$fAdditiveIntMap $fSetIntMapeps almostZero almostOneisNz withDefault roundZeroroundOne with2Defaults roundZeroOneUBLBmaxTupminTup denseIxArray denseIxArray2foldrMap foldlStrictifoldrinBounds inBounds2 inBounds0 inBounds02IxColIxRowColsRowsSpVectorSVsvDimsvDataspySVnzSV sizeStrSVzeroSV singletonSV mkSpVector mkSpVectorD mkSpVector1fromListDenseSV oneHotSVUoneHotSVonesSVzerosSVinsertSpVector fromListSVtoListSV toDenseListSVlookupSVlookupDefaultSV lookupDenseSVtailSVheadSVconcatSVfilterSV ifilterSV orthogonalSV$fShowSpVector$fNormedSpVector$fHilbertSpVector$fSparseSpVectora$fHasDataSpVectora$fFiniteDimSpVector$fVectorSpaceSpVector$fAdditiveSpVector$fFoldableSpVector $fSetSpVector$fFunctorSpVector $fEqSpVectorSMInfosmNzsmSpySpMatrixSMsmDimsmDatasizeStrzeroSM mkDiagonaleye permutationSM permutPairsSM mkSubDiagonalinsertSpMatrix fromListSM' fromListSMfromListDenseSM toDenseListSMlookupSM lookupWD_SM lookupWD_IM@@!@@extractSubmatrixSMextractSubmatrixRebalanceKeysextractSubmatrix extractRowSMextractSubRowSMextractSubRowSM_RK extractColSMextractSubColSMextractSubColSM_RK isValidIxSM isSquareSM isDiagonalSMisOrthogonalSMimmSMdimSMnelSMnrowsncolsinfoSMnzSMspySMnzRowbwMinSMbwMaxSM bwBoundsSM vertStackSM-=- horizStackSM-||-foldlSMifoldlSMcountSubdiagonalNZSMsubdiagIndicesSM sparsifyIM2 sparsifySMroundZeroOneSMswapRows swapRowsSafe transposeSM#^matScale normFrobeniusmatMat##matMatSparsified#~##^###^ contractSub$fSparseSpMatrixa$fHasDataSpMatrixa$fFiniteDimSpMatrix$fAdditiveSpMatrix $fSetSpMatrix$fFunctorSpMatrix$fShowSpMatrix $fEqSpMatrix $fEqSMInfo $fShowSMInfoprd insertRowWith insertRow insertColWith insertCol outerProdSV><svToSMtoSV extractRow extractColextractVectorDenseWithextractRowDenseextractColDenseextractDiagDense extractSubRowextractSubRow_RK extractSubColextractSubCol_RKmatVec#>vecMat<#$fPrintDenseSpMatrix$fPrintDenseSpVectorLinSolveMethodBICGSTAB _xBicgstabCGS_xBCG_xBcgTFQMR_xTfqCGNE_xCgne sparsifySVconditionNumberSMhhMathhReflgivensqreigsQR eigRayleighlucgnetfqmrbcgcgsStepcgs bicgstabStepbicgstablinSolve<\>modifyInspectNdiffSqL runAppendN'randMatrandVec randSpMat randSpVec$fShowBICGSTAB $fShowCGS $fShowBCG$fEqCGNE $fEqTFQMR$fEqBCG$fEqCGS $fEqBICGSTAB$fEqLinSolveMethod$fShowLinSolveMethod PrintDense showNonZero toDenseRowtoDenseRowClipnewline printDenseSMtoDenseListClip printDenseSV givensCoeffirstNonZeroColumn candidateRowsgmatsluInitluUpdripHoles tfqmrStepbcgSteppinv modifyUntil loopUntilAccuntilConvergednormDiffConverged runAppendNCGNE_TFQMR_BCG_CGS_ BICGSTAB_ _rBicgstab _pBicgstab_r_p_u_rBcg_rHatBcg_pBcg_pHatBcg_wTfq_uTfq_vTfq_dTfq_mTfq_tauTfq _thetaTfq_etaTfq_rhoTfq _alphaTfq_rCgne_pCgnehypotsignhhVuUpd'uUpd uUpdSparse solveForUij solveForLijlUpd'lUpd lUpdSparsepermutAAcgneStepmeanlnorm2l