You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very nice to add broadcasting of vectors into matrices to the spec. See Python/Julia and more languages for prior art. For instance if you ewise_mul(A::GrB_Matrix, v::GrB_Vector)v would expand across columns. Transpose operator could be used to expand across rows.
Note that this treats GrB_Vector explicitly as a column vector, which may not be in line with the spec.
This can already be achieved with a Diagonal matrix multiplication, but this has a few issues:
At least SS:GrB doesn't implement a Diagonal type internally, so it has storage/construction overhead as I understand it.
To expand over columns the diagonal must be on the left, vice versa for expanding over rows. This can be a problem for operations without commutativity.
The text was updated successfully, but these errors were encountered:
This may be related to (or part of) the rank promotion issue: #24
We have found this functionality to be useful for many algorithms--we use it all the time. We added syntax in python-graphblas that performs recipes for ewise-multiply, ewise-add, and ewise-union (Tim's GxB extension with left and right defaults) between Matrix and Vector objects. We apply masks as appropriate for the latter two operations.
So, +1 from me.
Yes, one can use GrB_Matrix_diag to first expand the vector to matrix. One then needs to do mxm with a semiring where only the binaryop is used. If we added methods to do this instead, it could take a BinaryOp (and/or Monoid--or even IndexUnaryOp if you're twisted) instead of a Semiring.
Forgive me if this is already an open issue.
It would be very nice to add broadcasting of vectors into matrices to the spec. See Python/Julia and more languages for prior art. For instance if you
ewise_mul(A::GrB_Matrix, v::GrB_Vector)
v
would expand across columns. Transpose operator could be used to expand across rows.Note that this treats
GrB_Vector
explicitly as a column vector, which may not be in line with the spec.This can already be achieved with a Diagonal matrix multiplication, but this has a few issues:
The text was updated successfully, but these errors were encountered: