Skip to content

Commit 768b76c

Browse files
fix documentation
1 parent 66df650 commit 768b76c

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

src/Operations/Element_wise_addition.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
44
Generic method for element-wise matrix and vector operations: using set union.
55
6-
GrB_eWiseAdd computes C<Mask> = accum (C, A+B), where pairs of elements in two matrices (or two vectors)
6+
`GrB_eWiseAdd` computes `C<Mask> = accum (C, A + B)`, where pairs of elements in two matrices (or two vectors)
77
are pairwise "added". The "add" operator can be any binary operator. With the plus operator,
8-
this is the same matrix addition in conventional linear algebra. The pattern of the result T=A+B is
9-
the set union of A and B. Entries outside of the union are not computed. That is, if both A(i,j) and B(i,j)
10-
are present in the pattern of A and B, then T(i,j) = A(i,j) "+" B(i,j). If only A(i,j) is present
11-
then T(i,j) = A (i,j) and the "+" operator is not used. Likewise, if only B(i,j) is in the pattern of B
12-
but A(i,j) is not in the pattern of A, then T(i,j) = B(i,j). For a semiring, the mult operator is the
8+
this is the same matrix addition in conventional linear algebra. The pattern of the result T = A + B is
9+
the set union of A and B. Entries outside of the union are not computed. That is, if both A(i, j) and B(i, j)
10+
are present in the pattern of A and B, then T(i, j) = A(i, j) "+" B(i, j). If only A(i, j) is present
11+
then T(i, j) = A (i, j) and the "+" operator is not used. Likewise, if only B(i, j) is in the pattern of B
12+
but A(i, j) is not in the pattern of A, then T(i, j) = B(i, j). For a semiring, the mult operator is the
1313
semiring's add operator.
1414
"""
1515
function GrB_eWiseAdd(C::T, mask::V, accum::W, op::U, A::T, B::T,
@@ -35,7 +35,7 @@ end
3535
GrB_eWiseAdd_Vector_Semiring(w, mask, accum, semiring, u, v, desc)
3636
3737
Compute element-wise vector addition using semiring. Semiring's add operator is used.
38-
w<mask> = accum (w, u+v)
38+
`w<mask> = accum (w, u + v)`
3939
4040
# Examples
4141
```jldoctest
@@ -103,7 +103,7 @@ end
103103
GrB_eWiseAdd_Vector_Monoid(w, mask, accum, monoid, u, v, desc)
104104
105105
Compute element-wise vector addition using monoid.
106-
w<mask> = accum (w, u+v)
106+
`w<mask> = accum (w, u + v)`
107107
108108
# Examples
109109
```jldoctest
@@ -171,7 +171,7 @@ end
171171
GrB_eWiseAdd_Vector_BinaryOp(w, mask, accum, add, u, v, desc)
172172
173173
Compute element-wise vector addition using binary operator.
174-
w<mask> = accum (w, u+v)
174+
`w<mask> = accum (w, u + v)`
175175
176176
# Examples
177177
```jldoctest
@@ -239,7 +239,7 @@ end
239239
GrB_eWiseAdd_Matrix_Semiring(C, Mask, accum, semiring, A, B, desc)
240240
241241
Compute element-wise matrix addition using semiring. Semiring's add operator is used.
242-
C<Mask> = accum (C, A+B)
242+
`C<Mask> = accum (C, A + B)`
243243
244244
# Examples
245245
```jldoctest
@@ -316,7 +316,7 @@ end
316316
GrB_eWiseAdd_Matrix_Monoid(C, Mask, accum, monoid, A, B, desc)
317317
318318
Compute element-wise matrix addition using monoid.
319-
C<Mask> = accum (C, A+B)
319+
`C<Mask> = accum (C, A + B)`
320320
321321
# Examples
322322
```jldoctest
@@ -384,7 +384,7 @@ end
384384
GrB_eWiseAdd_Matrix_BinaryOp(C, Mask, accum, add, A, B, desc)
385385
386386
Compute element-wise matrix addition using binary operator.
387-
C<Mask> = accum (C, A+B)
387+
`C<Mask> = accum (C, A + B)`
388388
389389
# Examples
390390
```jldoctest

src/Operations/Element_wise_multiplication.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
44
Generic method for element-wise matrix and vector operations: using set intersection.
55
6-
GrB_eWiseMult computes C<Mask> = accum (C, A.*B), where pairs of elements in two matrices (or vectors) are
7-
pairwise "multiplied" with C(i,j) = mult (A(i,j),B(i,j)). The "multiplication" operator can be any binary operator.
8-
The pattern of the result T=A.*B is the set intersection (not union) of A and B. Entries outside of the intersection
9-
are not computed. This is primary difference with GrB_eWiseAdd. The input matrices A and/or B may be transposed first,
6+
`GrB_eWiseMult` computes `C<Mask> = accum (C, A .* B)`, where pairs of elements in two matrices (or vectors) are
7+
pairwise "multiplied" with C(i, j) = mult (A(i, j), B(i, j)). The "multiplication" operator can be any binary operator.
8+
The pattern of the result T = A .* B is the set intersection (not union) of A and B. Entries outside of the intersection
9+
are not computed. This is primary difference with `GrB_eWiseAdd`. The input matrices A and/or B may be transposed first,
1010
via the descriptor. For a semiring, the mult operator is the semiring's multiply operator; this differs from the
1111
eWiseAdd methods which use the semiring's add operator instead.
1212
"""
@@ -33,7 +33,7 @@ end
3333
GrB_eWiseMult_Vector_Semiring(w, mask, accum, semiring, u, v, desc)
3434
3535
Compute element-wise vector multiplication using semiring. Semiring's multiply operator is used.
36-
w<mask> = accum (w, u.*v)
36+
`w<mask> = accum (w, u .* v)`
3737
3838
# Examples
3939
```jldoctest
@@ -101,7 +101,7 @@ end
101101
GrB_eWiseMult_Vector_Monoid(w, mask, accum, monoid, u, v, desc)
102102
103103
Compute element-wise vector multiplication using monoid.
104-
w<mask> = accum (w, u.*v)
104+
`w<mask> = accum (w, u .* v)`
105105
106106
# Examples
107107
```jldoctest
@@ -169,7 +169,7 @@ end
169169
GrB_eWiseMult_Vector_BinaryOp(w, mask, accum, mult, u, v, desc)
170170
171171
Compute element-wise vector multiplication using binary operator.
172-
w<mask> = accum (w, u.*v)
172+
`w<mask> = accum (w, u .* v)`
173173
174174
# Examples
175175
```jldoctest
@@ -237,7 +237,7 @@ end
237237
GrB_eWiseMult_Matrix_Semiring(C, Mask, accum, semiring, A, B, desc)
238238
239239
Compute element-wise matrix multiplication using semiring. Semiring's multiply operator is used.
240-
C<Mask> = accum (C, A.*B)
240+
`C<Mask> = accum (C, A .* B)`
241241
242242
# Examples
243243
```jldoctest
@@ -305,7 +305,7 @@ end
305305
GrB_eWiseMult_Matrix_Monoid(C, Mask, accum, monoid, A, B, desc)
306306
307307
Compute element-wise matrix multiplication using monoid.
308-
C<Mask> = accum (C, A.*B)
308+
`C<Mask> = accum (C, A .* B)`
309309
310310
# Examples
311311
```jldoctest
@@ -374,7 +374,7 @@ end
374374
GrB_eWiseMult_Matrix_BinaryOp(C, Mask, accum, mult, A, B, desc)
375375
376376
Compute element-wise matrix multiplication using binary operator.
377-
C<Mask> = accum (C, A.*B)
377+
`C<Mask> = accum (C, A .* B)`
378378
379379
# Examples
380380
```jldoctest

0 commit comments

Comments
 (0)