File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 16201620 " Converts a matrix to sparse representation.
16211621
16221622 Returns a vector of `[row col value]` triples for elements that satisfy the predicate function.
1623- By default includes all non-zero elements.
1623+ By default, includes all non-zero elements.
16241624
16251625 Examples:
16261626 (matrix->sparse [[1 0] [0 2]]) ;=> [[0 0 1] [1 1 2]]
19841984(defn merge-matrices
19851985 " Combines four matrices into a single matrix.
19861986
1987- Takes a map with keys ::top-left, ::top-right, ::bottom-left, ::bottom-right.
1988- This is the inverse operation of matrix-partition. Returns nil if matrices
1989- have incompatible dimensions.
1987+ Takes a map with keys ::top-left, ::top-right, ::bottom-left, ::bottom-right. This is the inverse
1988+ operation of matrix-partition. Returns nil if matrices have incompatible dimensions.
19901989
19911990 Examples:
19921991 (merge-matrices {::top-left [[1]] ::top-right [[2]]
21072106(defn kronecker-product
21082107 " Computes the Kronecker product of matrices.
21092108
2110- For matrices A (m×n) and B (p×q), produces an (mp)×(nq) matrix where each
2111- element A[i,j] is replaced by A[i,j] * B.
2109+ For matrices A (m×n) and B (p×q), produces a (mp)×(nq) matrix where each element A[i,j] is
2110+ replaced by A[i,j] * B.
21122111
21132112 Examples:
21142113 (kronecker-product [[1 2]] [[3 4]]) ;=> [[3 4 6 8]]
You can’t perform that action at this time.
0 commit comments