intersection

intersection, function

def const dash pure intersection(setA: long, setB: long): long
def process intersection(set: long): long

Returns the intersection of 64-sets, either for two sets or across a group.

Examples

AB = union(flag(1), flag(2))
BC = union(flag(2), flag(3))

show table "Pairwise" with
  text(intersection(AB, BC)) as "Result"

This produces the following table:

Result
{2}
table T = with
  [| as Set |]
  [| union(flag(1), flag(2)) |]
  [| union(flag(2), flag(3)) |]
  [| union(flag(2), flag(4)) |]

All = intersection(T.Set)

show table "Grouped" with
  text(All) as "Result"

This produces the following table:

Result
{2}

Remarks

If no default is specified, intersecting an empty group returns the full set {0..63}.

User Contributed Notes
0 notes + add a note