-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MIN_ONEB semiring #76
Comments
Using FIRST as a monoid would break GraphBLAS badly. MIN_ONEB would be better and has the same effect. |
bwahaha, yes, my bad. MIN_ONEB |
Internally, if I see a MIN_ONEB semiring (or many many other cases), I convert it into my ANY_PAIR_ISO semiring. That semiring is purely symbolic, and there are many semirings that map directly to it. See https://github.com/DrTimothyAldenDavis/GraphBLAS/blob/stable/Source/GB_iso_AxB.c . For any GrB_mxm operation where I can tell that C is iso, I call my ANY_PAIR_ISO method, and compute the single iso value of C in GB_iso_AxB.c. TIMES_PAIR_INT32 for example, does the same thing. C(i,j) = 1 in this case. |
The one thing that ANY provides that MIN cannot, is its use in the BFS where I can get different results, non-deterministically, but where all results are acceptable. In this case, ANY is much faster than MIN. |
A common use case for the ANY monoid (see #21) is in the ANY_PAIR semiring that is currently in SuiteSparse:GraphBLAS. The PAIR operator is called ONEB in the C spec, and, mathematically,
FIRST_ONEBMIN_ONEB is the same as ANY_ONEB. So, the simplest way to support most use cases for the ANY monoid is to add theFIRST_ONEBMIN_ONEB semiring to the C spec (possibly in 2.1).The text was updated successfully, but these errors were encountered: