|
3 | 3 |
|
4 | 4 | Generic method for element-wise matrix and vector operations: using set union.
|
5 | 5 |
|
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) |
7 | 7 | 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 |
13 | 13 | semiring's add operator.
|
14 | 14 | """
|
15 | 15 | function GrB_eWiseAdd(C::T, mask::V, accum::W, op::U, A::T, B::T,
|
|
35 | 35 | GrB_eWiseAdd_Vector_Semiring(w, mask, accum, semiring, u, v, desc)
|
36 | 36 |
|
37 | 37 | 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)` |
39 | 39 |
|
40 | 40 | # Examples
|
41 | 41 | ```jldoctest
|
|
103 | 103 | GrB_eWiseAdd_Vector_Monoid(w, mask, accum, monoid, u, v, desc)
|
104 | 104 |
|
105 | 105 | Compute element-wise vector addition using monoid.
|
106 |
| -w<mask> = accum (w, u+v) |
| 106 | +`w<mask> = accum (w, u + v)` |
107 | 107 |
|
108 | 108 | # Examples
|
109 | 109 | ```jldoctest
|
|
171 | 171 | GrB_eWiseAdd_Vector_BinaryOp(w, mask, accum, add, u, v, desc)
|
172 | 172 |
|
173 | 173 | Compute element-wise vector addition using binary operator.
|
174 |
| -w<mask> = accum (w, u+v) |
| 174 | +`w<mask> = accum (w, u + v)` |
175 | 175 |
|
176 | 176 | # Examples
|
177 | 177 | ```jldoctest
|
|
239 | 239 | GrB_eWiseAdd_Matrix_Semiring(C, Mask, accum, semiring, A, B, desc)
|
240 | 240 |
|
241 | 241 | 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)` |
243 | 243 |
|
244 | 244 | # Examples
|
245 | 245 | ```jldoctest
|
|
316 | 316 | GrB_eWiseAdd_Matrix_Monoid(C, Mask, accum, monoid, A, B, desc)
|
317 | 317 |
|
318 | 318 | Compute element-wise matrix addition using monoid.
|
319 |
| -C<Mask> = accum (C, A+B) |
| 319 | +`C<Mask> = accum (C, A + B)` |
320 | 320 |
|
321 | 321 | # Examples
|
322 | 322 | ```jldoctest
|
|
384 | 384 | GrB_eWiseAdd_Matrix_BinaryOp(C, Mask, accum, add, A, B, desc)
|
385 | 385 |
|
386 | 386 | Compute element-wise matrix addition using binary operator.
|
387 |
| -C<Mask> = accum (C, A+B) |
| 387 | +`C<Mask> = accum (C, A + B)` |
388 | 388 |
|
389 | 389 | # Examples
|
390 | 390 | ```jldoctest
|
|
0 commit comments