- Notifications
You must be signed in to change notification settings - Fork15
Clarify in docs that monoids are commutative and associative#469
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Clarify in docs that monoids are commutative and associative#469
Uh oh!
There was an error while loading.Please reload this page.
Conversation
coveralls commentedJun 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
SultanOrazbayev left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good, with a possible clarification that GraphBLAS uses commutative monoids (so commutative is not part of the definition of a monoid, but the monoids used by GraphBLAS also have this property). That's my understanding from the "Design of the GraphBLAS API for C" paper and, ahem, Wikipedia.
eriknw commentedJun 28, 2023
Thanks for looking@SultanOrazbayev. Refined. |
SultanOrazbayev left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you, LGTM!
Uh oh!
There was an error while loading.Please reload this page.
Technically Monoids don't need to commute, but behavior is ill-defined (or invalid) if non-commutative monoids are used for reductions and semirings, so, practically speaking, all monoids should commute in GraphBLAS. I don't know of any use cases for non-commutative monoids--a binary operator should always be possible to use and preferred.
Fixes#468.