-
Notifications
You must be signed in to change notification settings - Fork 16
Description
In graphblas_algorithms, I would sometimes like to know whether the operator I'm using is "extremal" (explained later) when computing cached values.
Example operators: band, bor, land, lor, max, min, and maybe any (b/c any is a "special" monoid).
For example, for an undirected graph, I can compute the min element via A.reduce_scalar(min) or by L.reduce_scalar(min). Using the lower diagonal matrix L would be preferred if it's available, because it should be faster.
What's a good name for this property? I describe it as extremal, because it has the following behavior:
Suppose we reduce a set of values S = {s_0, s_1, ...} with a monoid op and get the result x. x is "extremal" if op(x, s_i) == x for all s_i in S.
@DrTimothyAldenDavis, is there a good mathematical term for this property? These extremal monoids also have the property that their identity and terminal values are the boundaries of their domains.
@jim22k, what do you think of adding e.g. gb.monoid.min.is_extremal property to monoids?