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
When dealing with sets, one often needs to check whether two sets have a non-empty intersection, but the intersection itself is not interesting. This can currently be written as isempty(a ∩ b), but this is likely much less efficient. There should be a function that checks for intersection, returning Bool.
What would be a good name for this? Python uses isdisjoint.
The text was updated successfully, but these errors were encountered:
Seems like a good idea, and a decent name. This seems to be one of those weird cases where the only word for something is negative; you can be "disjoint" or even "nondisjoint" but not "joint".
You can be "intersecting", so isintersecting would also work.
However, if you allow three sets as arguments, the meanings differ -- isdisjoint implies they are all disjoint, whereas isintersecting implies they are all intersecting, thus they are not opposites. (This is relevant since Base has multi-argument methods for intersect and union.)
When dealing with sets, one often needs to check whether two sets have a non-empty intersection, but the intersection itself is not interesting. This can currently be written as
isempty(a ∩ b)
, but this is likely much less efficient. There should be a function that checks for intersection, returningBool
.What would be a good name for this? Python uses
isdisjoint
.The text was updated successfully, but these errors were encountered: