Clarify in docs that monoids are commutative and associative#469
Merged
eriknw merged 3 commits intopython-graphblas:mainfrom Jun 28, 2023
Merged
Clarify in docs that monoids are commutative and associative#469eriknw merged 3 commits intopython-graphblas:mainfrom
eriknw merged 3 commits intopython-graphblas:mainfrom
Conversation
SultanOrazbayev
approved these changes
Jun 27, 2023
Member
SultanOrazbayev
left a comment
There was a problem hiding this comment.
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.
Member
Author
|
Thanks for looking @SultanOrazbayev. Refined. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.