|
1 | 1 | import GraphBLASInterface: |
2 | | - GrB_eWiseAdd_Vector_Semiring, GrB_eWiseAdd_Vector_Monoid, GrB_eWiseAdd_Vector_BinaryOp, |
| 2 | + GrB_eWiseAdd, GrB_eWiseAdd_Vector_Semiring, GrB_eWiseAdd_Vector_Monoid, GrB_eWiseAdd_Vector_BinaryOp, |
3 | 3 | GrB_eWiseAdd_Matrix_Semiring, GrB_eWiseAdd_Matrix_Monoid, GrB_eWiseAdd_Matrix_BinaryOp |
4 | 4 |
|
| 5 | +""" |
| 6 | + GrB_eWiseAdd(C, mask, accum, op, A, B, desc) |
| 7 | +
|
| 8 | +Generic method for element-wise matrix and vector operations: using set union. |
| 9 | +
|
| 10 | +`GrB_eWiseAdd` computes `C<Mask> = accum (C, A + B)`, where pairs of elements in two matrices (or two vectors) |
| 11 | +are pairwise "added". The "add" operator can be any binary operator. With the plus operator, |
| 12 | +this is the same matrix addition in conventional linear algebra. The pattern of the result T = A + B is |
| 13 | +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) |
| 14 | +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 |
| 15 | +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 |
| 16 | +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 |
| 17 | +semiring's add operator. |
| 18 | +""" |
| 19 | +function GrB_eWiseAdd end |
| 20 | + |
5 | 21 | """ |
6 | 22 | GrB_eWiseAdd_Vector_Semiring(w, mask, accum, semiring, u, v, desc) |
7 | 23 |
|
|
0 commit comments