~W      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV Safe-InferedWDot product of two Xs (for internal use) Y6Shifts (re-enumerates) keys of IntMap by given number ZCAdds 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 \DSplits 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)] )WYZ[\WYZ[\WYZ[\ Safe-Infered5Sparse 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 "Dot product of two sparse vectors Unicode alias for  ]2Shows size and filled vector (but without zeroes) ^Monoid _4 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]`a operators like (*), (+) and (-) work on sparse vectors  like b ( &)2 works on lists, except size of result is maximum  of arguments sizes. c, d and e work through f , so usual a laws  are satisfied (such as (signum v)*(abs v) == v. g/ constructs a vector with single element (only fromInteger 0 = ). So, 3 + (sparseList [0,2,1])sparseList [3,2,1]h.fold functions are applied to non-zero values if2 applies given function on vector non-zero values  ]^`hi   ]^`hi Safe-Infered;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 -%Just adds zero column at given index .;Deletes row at given index, decreasing matrix height by 1 ! and shifting indexes after it /=Deletes column at given index, decreasing matrix width by 1 ! and shifting indexes after it 0(Deletes row and column at given indexes 1TSeparates 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 2CLooks up an element in the matrix (if not found, zero is returned) 3%Returns row of matrix at given index 4(Returns column of matrix at given index 5+Updates values in row using given function 6@Fills row with zeroes (i.e. deletes it, but size of matrix doesn' t change) 7%Erases matrix element at given index 8>Inserts new element to the sparse matrix (replaces old value) 9qFinds 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 >.Replaces row at given index with given vector ? Exchanges positions of two rows @'Applies vector-function on matrix rows A9Constructs square matrix with given elements on diagonal B!Collects main diagonal of matrix C&Constructs matrix from a list of rows D,Converts sparse matrix to associative list, F adding fake zero element, to save real size for inverse conversion E,Converts associative list to sparse matrix,  of given size F,Converts associative list to sparse matrix, & using maximal index as matrix size GEConverts sparse matrix to plain list-matrix with all zeroes restored HEConverts plain list-matrix to sparse matrix, throwing out all zeroes I(Transposes matrix (rows become columns) J Matrix-by-vector multiplication KUnicode alias for J L Vector-by-matrix multiplication MUnicode alias for L NSparse matrices multiplication OUnicode alias for N j2Shows size and filled matrix (but without zeroes) kl is just  _ is horisontal concatenation mAll a* work on sparse matrices the same way as  on  (see documentation there) nf/ applies given function on all non-zero values > !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOjkmn: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO; !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOjkmn Safe-InferedPStaircase Form of matrix. :It uses an identity matrix as initial protocol matrix for Q. 'It returns also transformation matrix: (let (s, t) = staircase m in t m == sTrue Usage of o causes p 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. QStaircase 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 o causes p 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. RExtended Euclid algorithm  extGCD a b returns (x,y) , such that  x (a   b) == gcd a b y (a   b) == 0PQRPQRQPRPQR Safe-InferedS#Checks if matrix has diagonal form TKTransforms 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 STSTSTST Safe-InferedU7Just solves system of linear equations in matrix form 4 for given left-side matrix and right-side vector VkSolves a set of systems for given left-side matrix and each right-side vector of given set (sparse vector) UVleft-side matrix right-side vectors "if one of systems has no solution q is returned UVUVUV Safe-InferedPQRSTUV Safe-InferedW  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVr      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmjnojpqjnrjnsjntjuvjnwxyz{jk|}~jjjsparse-lin-alg-0.4 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 sparseListdot· SparseMatrixSMdimsmxSMxheightwidthsetSizeemptyMxzeroMxisZeroMx isNotZeroMxidMx//hconcatvconcat sizedBlockMx sizedBlockSMxblockMxblockSMxaddRowaddCol addZeroRow addZeroColdelRowdelCol delRowCol separateMx#rowcolupdRoweraseRoweraseinsfindRowIndicesfindRowIndicesRpopRow|><| replaceRow exchangeRows mapOnRows diagonalMxmainDiagfromRows toAssocListfromAssocListWithSize fromAssocListfillMxsparseMxtransmulMV×·mulVM·×mul× staircase staircase'extGCDisDiagtoDiag solveLinearsolveLinSystems··containers-0.4.2.1 Data.IntMapIntMap shiftKeysaddElemdelElem partitionMap$fShowSparseVector$fMonoidSparseVectorbase Data.Monoidmappend$fNumSparseVectorGHC.NumNumGHC.ListzipWithsignumabsnegateGHC.Basefmap fromInteger$fFoldableSparseVector$fFunctorSparseVector$fShowSparseMatrix$fMonoidSparseMatrixmempty$fNumSparseMatrix$fFunctorSparseMatrixGHC.RealdivModIntegral Data.MaybeNothing