๚ฮ”๛\      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ Safe-Inferred\Dot product of two ]s (for internal use) ^6Shifts (re-enumerates) keys of IntMap by given number _CAdds element to the map at given index, shifting all keys after it `FDeletes element of the map at given index, shifting all keys after it aDSplits map using predicate and returns a pair with filtered map and ( re-enumereted second part (that doesn'#t satisfy predicate). For example: ?partitionMap (>0) (fromList [(1,1),(2,-1),(3,-2),(4,3),(5,-4)]);( fromList [(1,1),(4,3)], fromList [(1,-1),(2,-2),(3,-4)] )\^_`a\^_`a\^_`a Safe-Inferred5Sparse vector is just indexed map of non-zero values "real size of vector (with zeroes) IntMap storing non-zero values  Type of internal vector storage  Sets vector's size #Vector of zero size with no values -Vector of given size with no non-zero values 8Checks if vector has no non-zero values (i.e. is empty) 8Checks if vector has no non-zero values (i.e. is empty) $Vector of length 1 with given value JSplits vector using predicate and returns a pair with filtered values and ( re-enumereted second part (that doesn'#t satisfy predicate). For example: 9partitionVec (>0) (sparseList [0,1,-1,2,3,0,-4,5,-6,0,7])=( sparseList [0,1,0,2,3,0,0,5,0,0,7], sparseList [-1,-4,-6] ) CLooks up an element in the vector (if not found, zero is returned) >Deletes element of vector at given index (size of vector doesn' t change) Updates value at given index MUnions non-zero values of vectors and applies given function on intersection IIntersects non-zero values of vectors and applies given function on them ,Returns plain list with all zeroes restored >Converts plain list to sparse vector, throwing out all zeroes /Converts sparse vector to an associative list, F adding fake zero element, to save real size for inverse conversion ,Converts associative list to sparse vector,  of given size ,Converts associative list to sparse vector,  using maximal index as it's size "Dot product of two sparse vectors Unicode alias for  b2Shows size and filled vector (but without zeroes) cMonoid d4 operation works like concatenation of two vectors 6 (indexes of second are shifted by length of first)  Examples: .(sparseList [0,1,0,2]) <> (sparseList [3,0,4])sparseList [0,1,0,2,3,0,4]1 <> (sparseList [2,3])sparseList [1,2,3]ef operators like (*), (+) and (-) work on sparse vectors  like g ( &)2 works on lists, except size of result is maximum  of arguments sizes. h, i and j work through k , so usual f laws  are satisfied (such as (signum v)*(abs v) == v. l/ constructs a vector with single element (only fromInteger 0 = ). So, 3 + (sparseList [0,2,1])sparseList [3,2,1]m.fold functions are applied to non-zero values nk2 applies given function on vector non-zero values op bcemn  op bcemn Safe-Inferred>0Sparse matrix is indexed map of non-zero rows, 'real height and width of filled matrix /IntMap (IntMap ฑ) representing non-zero values Internal storage of matrix Matrix real height and width Matrix real height and width  Sets height and width of matrix !#Matrix of zero size with no values "Zero matrix of given size #8Checks if matrix has no non-zero values (i.e. is empty) $8Checks if matrix has no non-zero values (i.e. is empty) %Identity matrix of given size &Vertical concatenation 'Batch horisontal/vertical concatenation (Batch horisontal/vertical concatenation )7Takes size of each block and matrix of sparse matrices 1 and constructs sparse matrix from this blocks */Fills sparse matrix of blocks and then applies ) -8Adds row at given index, increasing matrix height by 1 ! and shifting indexes after it .:Adds column at given index, increasing matrix width by 1 ! and shifting indexes after it /"Just adds zero row at given index 0%Just adds zero column at given index 1;Deletes row at given index, decreasing matrix height by 1 ! and shifting indexes after it 2=Deletes column at given index, decreasing matrix width by 1 ! and shifting indexes after it 3(Deletes row and column at given indexes qWARNING: doesn't work with empty rows :Partitions matrix, using pedicate on rows and returns two new matrices, Q one constructed from rows satisfying predicate, and another from rows that don't 4TSeparates matrix, using pedicate on rows and returns two matrices of the same size, K one only with rows satisfying predicate, and another with the rest rows 5CLooks up an element in the matrix (if not found, zero is returned) 6%Returns row of matrix at given index 7(Returns column of matrix at given index 8+Updates values in row using given function 9@Fills row with zeroes (i.e. deletes it, but size of matrix doesn' t change) :%Erases matrix element at given index ;>Inserts new element to the sparse matrix (replaces old value) <qFinds indices of rows, that satisfy given predicate. Searches from left to right (in ascending order of indices) =rFinds indices of rows, that satisfy given predicate. Searches from right to left (in descending order of indices) >3Returns a row at given index and matrix without it ?Adds row to matrix at the top @!Adds row to matrix at the bottom A.Replaces row at given index with given vector B Exchanges positions of two rows C'Applies vector-function on matrix rows D Returns vector with matrix rows E$Returns vector with matrix columns ( rows . trans) F9Constructs square matrix with given elements on diagonal G!Collects main diagonal of matrix H"Constructs matrix from a set (listvectoretc.) of rows I,Converts sparse matrix to associative list, F adding fake zero element, to save real size for inverse conversion J,Converts associative list to sparse matrix,  of given size K,Converts associative list to sparse matrix, & using maximal index as matrix size LEConverts sparse matrix to plain list-matrix with all zeroes restored MEConverts plain list-matrix to sparse matrix, throwing out all zeroes N(Transposes matrix (rows become columns) O Matrix-by-vector multiplication PUnicode alias for O Q Vector-by-matrix multiplication RUnicode alias for Q SSparse matrices multiplication TUnicode alias for S r2Shows size and filled matrix (but without zeroes) st is just ! d is horisontal concatenation uAll f* work on sparse matrices the same way as  on  (see documentation there) vk/ applies given function on all non-zero values Dwxy !"#$%&'()*+,-./0123q456789:;<=>?@ABCDEFGHIJKLMNOPQRSTrsuv< !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST< !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTAwxy !"#$%&'()*+,-./0123q456789:;<=>?@ABCDEFGHIJKLMNOPQRSTrsuv Safe-InferredUStaircase Form of matrix. :It uses an identity matrix as initial protocol matrix for V. 'It returns also transformation matrix: (let (s, t) = staircase m in t ื m == sTrue Usage of z causes { context. (TODO: eliminate it) Method: C Gauss method applied to the rows of matrix. Though ฑ may be not C a field, we repeat the remainder division to obtain zeroes down  in the column. VStaircase Form of matrix. CIt takes matrix itself and initial protocol matrix and applies all E transformations to both of them in the same way, and then returns = matrix in the staircase form and a transformation matrix.  Usage of z causes { context. (TODO: eliminate it) Method: C Gauss method applied to the rows of matrix. Though ฑ may be not C a field, we repeat the remainder division to obtain zeroes down  in the column. |Fills column with zeroes WExtended Euclid algorithm  extGCD a b returns (x,y) , such that  x ท (a <> b) == gcd a b y ท (a <> b) == 0UV|+row index (clears column beneath this row)  column index matrix itself protocol matrix *result matrix and changed protocol matrix WUVWVUWUV|W Safe-InferredX#Checks if matrix has diagonal form YKTransforms matrix to diagonal form and returns also two protocol matrices: 1let (d,t,u) = toDiag m in t ื m ื (trans u) == dTruet! stores rows transformations and u  columns transformations XY}~XYXYXY}~ Safe-Inferred*Solves system for matrix in diagonal form Z7Just solves system of linear equations in matrix form 4 for given left-side matrix and right-side vector [kSolves a set of systems for given left-side matrix and each right-side vector of given set (sparse vector) return triple-value of Y right-hand-side vector !either error message or solution €Z[left-side matrix right-side vectors "if one of systems has no solution  is returned Z[Z[€Z[ Safe-InferredUVWXYZ[ Safe-Inferred\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[‚      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrostouvoswosxosyoz{os|}~€‚ƒop„…†‡ˆ€o‰Šo‰‹ŒŽo‘’“sparse-lin-alg-0.4.3 Math.LinearAlgebra.Sparse.Vector Math.LinearAlgebra.Sparse.Matrix.Math.LinearAlgebra.Sparse.Algorithms.Staircase-Math.LinearAlgebra.Sparse.Algorithms.Diagonal0Math.LinearAlgebra.Sparse.Algorithms.SolveLinear)Math.LinearAlgebra.Sparse.IntMapUtilities$Math.LinearAlgebra.Sparse.AlgorithmsMath.LinearAlgebra.Sparse SparseVectorSVdimvecSVecIndex setLengthemptyVeczeroVec isZeroVec isNotZeroVecsingVec partitionVec! eraseInVecvecIns unionVecsWithintersectVecsWithfillVec sparseListvecToAssocListvecFromAssocListWithSizevecFromAssocListdotยท SparseMatrixSMdimsmxSMxheightwidthsetSizeemptyMxzeroMxisZeroMx isNotZeroMxidMx//hconcatvconcat sizedBlockMx sizedBlockSMxblockMxblockSMxaddRowaddCol addZeroRow addZeroColdelRowdelCol delRowCol separateMx#rowcolupdRoweraseRoweraseinsfindRowIndicesfindRowIndicesRpopRow|><| replaceRow exchangeRows mapOnRowsrowscolumns diagonalMxmainDiagfromRows toAssocListfromAssocListWithSize fromAssocListfillMxsparseMxtransmulMVร—ยทmulVMยทร—mulร— staircase staircase'extGCDisDiagtoDiag solveLinearsolveLinSystemsยทยทcontainers-0.5.0.0Data.IntMap.BaseIntMap shiftKeysaddElemdelElem partitionMap$fShowSparseVector$fMonoidSparseVectorbase Data.Monoidmappend$fNumSparseVectorGHC.NumNumGHC.ListzipWithsignumabsnegateGHC.Basefmap fromInteger$fFoldableSparseVector$fFunctorSparseVectorshowSparseList showNonZero partitionMx$fShowSparseMatrix$fMonoidSparseMatrixmempty$fNumSparseMatrix$fFunctorSparseMatrixshowSparseMatrixcolumnGHC.RealdivModIntegral clearColumntoDiag'dm solveDiagonal solveDiag Data.MaybeNothing