mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
library/bag.m:
The old implementations of bag.subtract, bag.least_upper_bound,
bag.union, bag.intersect iterated over their second bag arguments,
and did a logarithmic amount of work in each iteration. This is good
if the second bag is small, but not if it is big. Keep those
implementations as the implementation of bag.subtract_small,
bag.least_upper_bound_small etc, and replace the implementation
of bag.subtract etc with code that iterates over the assoc_list version
of both bags. This does work that linear in total size of the two sets.
Replace the implementation of bag.subset_compare with one
that actually works.
Replace the implementation of bag.is_subbag with one that
does significantly less work.
Group related predicates together.
Improve the documentation of the exported predicates.
Use a more descriptive and more consistent set of variable names.
tests/hard_coded/test_bag.{m,exp}:
A new test case, to test the new algorithms in bag.m.
tests/hard_coded/Mmakefile:
Enable the new test case.
730 lines
29 KiB
Plaintext
730 lines
29 KiB
Plaintext
-----------------------------------------
|
|
BagA = [11, 12, 13]
|
|
BagB = [11, 12, 13]
|
|
A subtract B: []
|
|
A least_upper_bound B: [11, 12, 13]
|
|
A union B: [11, 11, 12, 12, 13, 13]
|
|
A intersect B: [11, 12, 13]
|
|
A '=' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 12, 13]
|
|
BagB = [11, 11, 12, 13, 13]
|
|
A subtract B: []
|
|
A least_upper_bound B: [11, 11, 12, 13, 13]
|
|
A union B: [11, 11, 11, 12, 12, 13, 13, 13]
|
|
A intersect B: [11, 12, 13]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 12, 13]
|
|
BagB = [11, 11, 12, 12, 13, 13]
|
|
A subtract B: []
|
|
A least_upper_bound B: [11, 11, 12, 12, 13, 13]
|
|
A union B: [11, 11, 11, 12, 12, 12, 13, 13, 13]
|
|
A intersect B: [11, 12, 13]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 12, 13]
|
|
BagB = [5, 5, 6]
|
|
A subtract B: [11, 12, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 12, 13]
|
|
A union B: [5, 5, 6, 11, 12, 13]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 12, 13]
|
|
BagB = [25, 26, 26]
|
|
A subtract B: [11, 12, 13]
|
|
A least_upper_bound B: [11, 12, 13, 25, 26, 26]
|
|
A union B: [11, 12, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 12, 13]
|
|
BagB = [5, 5, 6, 25, 26, 26]
|
|
A subtract B: [11, 12, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 12, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 12, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 12, 13]
|
|
BagB = [5, 5, 6, 12]
|
|
A subtract B: [11, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 12, 13]
|
|
A union B: [5, 5, 6, 11, 12, 12, 13]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 12, 13]
|
|
BagB = [12, 25, 26, 26]
|
|
A subtract B: [11, 13]
|
|
A least_upper_bound B: [11, 12, 13, 25, 26, 26]
|
|
A union B: [11, 12, 12, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 12, 13]
|
|
BagB = [5, 5, 6, 12, 25, 26, 26]
|
|
A subtract B: [11, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 12, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 12, 12, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 13, 13]
|
|
BagB = [11, 12, 13]
|
|
A subtract B: [11, 13]
|
|
A least_upper_bound B: [11, 11, 12, 13, 13]
|
|
A union B: [11, 11, 11, 12, 12, 13, 13, 13]
|
|
A intersect B: [11, 12, 13]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 13, 13]
|
|
BagB = [11, 11, 12, 13, 13]
|
|
A subtract B: []
|
|
A least_upper_bound B: [11, 11, 12, 13, 13]
|
|
A union B: [11, 11, 11, 11, 12, 12, 13, 13, 13, 13]
|
|
A intersect B: [11, 11, 12, 13, 13]
|
|
A '=' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 13, 13]
|
|
BagB = [11, 11, 12, 12, 13, 13]
|
|
A subtract B: []
|
|
A least_upper_bound B: [11, 11, 12, 12, 13, 13]
|
|
A union B: [11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13]
|
|
A intersect B: [11, 11, 12, 13, 13]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 13, 13]
|
|
BagB = [5, 5, 6]
|
|
A subtract B: [11, 11, 12, 13, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 13, 13]
|
|
A union B: [5, 5, 6, 11, 11, 12, 13, 13]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 13, 13]
|
|
BagB = [25, 26, 26]
|
|
A subtract B: [11, 11, 12, 13, 13]
|
|
A least_upper_bound B: [11, 11, 12, 13, 13, 25, 26, 26]
|
|
A union B: [11, 11, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 13, 13]
|
|
BagB = [5, 5, 6, 25, 26, 26]
|
|
A subtract B: [11, 11, 12, 13, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 13, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 11, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 13, 13]
|
|
BagB = [5, 5, 6, 12]
|
|
A subtract B: [11, 11, 13, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 13, 13]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 13, 13]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 13, 13]
|
|
BagB = [12, 25, 26, 26]
|
|
A subtract B: [11, 11, 13, 13]
|
|
A least_upper_bound B: [11, 11, 12, 13, 13, 25, 26, 26]
|
|
A union B: [11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 13, 13]
|
|
BagB = [5, 5, 6, 12, 25, 26, 26]
|
|
A subtract B: [11, 11, 13, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 13, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 12, 13, 13]
|
|
BagB = [11, 12, 13]
|
|
A subtract B: [11, 12, 13]
|
|
A least_upper_bound B: [11, 11, 12, 12, 13, 13]
|
|
A union B: [11, 11, 11, 12, 12, 12, 13, 13, 13]
|
|
A intersect B: [11, 12, 13]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 12, 13, 13]
|
|
BagB = [11, 11, 12, 13, 13]
|
|
A subtract B: [12]
|
|
A least_upper_bound B: [11, 11, 12, 12, 13, 13]
|
|
A union B: [11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13]
|
|
A intersect B: [11, 11, 12, 13, 13]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 12, 13, 13]
|
|
BagB = [11, 11, 12, 12, 13, 13]
|
|
A subtract B: []
|
|
A least_upper_bound B: [11, 11, 12, 12, 13, 13]
|
|
A union B: [11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13]
|
|
A intersect B: [11, 11, 12, 12, 13, 13]
|
|
A '=' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 12, 13, 13]
|
|
BagB = [5, 5, 6]
|
|
A subtract B: [11, 11, 12, 12, 13, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 12, 13, 13]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 13, 13]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 12, 13, 13]
|
|
BagB = [25, 26, 26]
|
|
A subtract B: [11, 11, 12, 12, 13, 13]
|
|
A least_upper_bound B: [11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A union B: [11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 12, 13, 13]
|
|
BagB = [5, 5, 6, 25, 26, 26]
|
|
A subtract B: [11, 11, 12, 12, 13, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 12, 13, 13]
|
|
BagB = [5, 5, 6, 12]
|
|
A subtract B: [11, 11, 12, 13, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 12, 13, 13]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 12, 13, 13]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 12, 13, 13]
|
|
BagB = [12, 25, 26, 26]
|
|
A subtract B: [11, 11, 12, 13, 13]
|
|
A least_upper_bound B: [11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A union B: [11, 11, 12, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [11, 11, 12, 12, 13, 13]
|
|
BagB = [5, 5, 6, 12, 25, 26, 26]
|
|
A subtract B: [11, 11, 12, 13, 13]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6]
|
|
BagB = [11, 12, 13]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 11, 12, 13]
|
|
A union B: [5, 5, 6, 11, 12, 13]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6]
|
|
BagB = [11, 11, 12, 13, 13]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 13, 13]
|
|
A union B: [5, 5, 6, 11, 11, 12, 13, 13]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6]
|
|
BagB = [11, 11, 12, 12, 13, 13]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 12, 13, 13]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 13, 13]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6]
|
|
BagB = [5, 5, 6]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6]
|
|
A union B: [5, 5, 5, 5, 6, 6]
|
|
A intersect B: [5, 5, 6]
|
|
A '=' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6]
|
|
BagB = [25, 26, 26]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 25, 26, 26]
|
|
A union B: [5, 5, 6, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6]
|
|
BagB = [5, 5, 6, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 25, 26, 26]
|
|
A intersect B: [5, 5, 6]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6]
|
|
BagB = [5, 5, 6, 12]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 12]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12]
|
|
A intersect B: [5, 5, 6]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6]
|
|
BagB = [12, 25, 26, 26]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6]
|
|
BagB = [5, 5, 6, 12, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 25, 26, 26]
|
|
A intersect B: [5, 5, 6]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [25, 26, 26]
|
|
BagB = [11, 12, 13]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [11, 12, 13, 25, 26, 26]
|
|
A union B: [11, 12, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [25, 26, 26]
|
|
BagB = [11, 11, 12, 13, 13]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [11, 11, 12, 13, 13, 25, 26, 26]
|
|
A union B: [11, 11, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [25, 26, 26]
|
|
BagB = [11, 11, 12, 12, 13, 13]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A union B: [11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [25, 26, 26]
|
|
BagB = [5, 5, 6]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 25, 26, 26]
|
|
A union B: [5, 5, 6, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [25, 26, 26]
|
|
BagB = [25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [25, 26, 26]
|
|
A union B: [25, 25, 26, 26, 26, 26]
|
|
A intersect B: [25, 26, 26]
|
|
A '=' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [25, 26, 26]
|
|
BagB = [5, 5, 6, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 25, 26, 26]
|
|
A union B: [5, 5, 6, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [25, 26, 26]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [25, 26, 26]
|
|
BagB = [5, 5, 6, 12]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [25, 26, 26]
|
|
BagB = [12, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [12, 25, 26, 26]
|
|
A union B: [12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [25, 26, 26]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [25, 26, 26]
|
|
BagB = [5, 5, 6, 12, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [25, 26, 26]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 25, 26, 26]
|
|
BagB = [11, 12, 13]
|
|
A subtract B: [5, 5, 6, 25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 11, 12, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 12, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 25, 26, 26]
|
|
BagB = [11, 11, 12, 13, 13]
|
|
A subtract B: [5, 5, 6, 25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 13, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 11, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 25, 26, 26]
|
|
BagB = [11, 11, 12, 12, 13, 13]
|
|
A subtract B: [5, 5, 6, 25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 25, 26, 26]
|
|
BagB = [5, 5, 6]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 25, 26, 26]
|
|
A intersect B: [5, 5, 6]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 25, 26, 26]
|
|
BagB = [25, 26, 26]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 25, 26, 26]
|
|
A union B: [5, 5, 6, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [25, 26, 26]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 25, 26, 26]
|
|
BagB = [5, 5, 6, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [5, 5, 6, 25, 26, 26]
|
|
A '=' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 25, 26, 26]
|
|
BagB = [5, 5, 6, 12]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 25, 26, 26]
|
|
A intersect B: [5, 5, 6]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 25, 26, 26]
|
|
BagB = [12, 25, 26, 26]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [25, 26, 26]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 25, 26, 26]
|
|
BagB = [5, 5, 6, 12, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [5, 5, 6, 25, 26, 26]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12]
|
|
BagB = [11, 12, 13]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 11, 12, 13]
|
|
A union B: [5, 5, 6, 11, 12, 12, 13]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12]
|
|
BagB = [11, 11, 12, 13, 13]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 13, 13]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 13, 13]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12]
|
|
BagB = [11, 11, 12, 12, 13, 13]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 12, 13, 13]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 12, 13, 13]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12]
|
|
BagB = [5, 5, 6]
|
|
A subtract B: [12]
|
|
A least_upper_bound B: [5, 5, 6, 12]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12]
|
|
A intersect B: [5, 5, 6]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12]
|
|
BagB = [25, 26, 26]
|
|
A subtract B: [5, 5, 6, 12]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12]
|
|
BagB = [5, 5, 6, 25, 26, 26]
|
|
A subtract B: [12]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 25, 26, 26]
|
|
A intersect B: [5, 5, 6]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12]
|
|
BagB = [5, 5, 6, 12]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 12]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 12]
|
|
A intersect B: [5, 5, 6, 12]
|
|
A '=' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12]
|
|
BagB = [12, 25, 26, 26]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 12, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12]
|
|
BagB = [5, 5, 6, 12, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 12, 25, 26, 26]
|
|
A intersect B: [5, 5, 6, 12]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [12, 25, 26, 26]
|
|
BagB = [11, 12, 13]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [11, 12, 13, 25, 26, 26]
|
|
A union B: [11, 12, 12, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [12, 25, 26, 26]
|
|
BagB = [11, 11, 12, 13, 13]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [11, 11, 12, 13, 13, 25, 26, 26]
|
|
A union B: [11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [12, 25, 26, 26]
|
|
BagB = [11, 11, 12, 12, 13, 13]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A union B: [11, 11, 12, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [12, 25, 26, 26]
|
|
BagB = [5, 5, 6]
|
|
A subtract B: [12, 25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 25, 26, 26]
|
|
A intersect B: []
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [12, 25, 26, 26]
|
|
BagB = [25, 26, 26]
|
|
A subtract B: [12]
|
|
A least_upper_bound B: [12, 25, 26, 26]
|
|
A union B: [12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [25, 26, 26]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [12, 25, 26, 26]
|
|
BagB = [5, 5, 6, 25, 26, 26]
|
|
A subtract B: [12]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [25, 26, 26]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [12, 25, 26, 26]
|
|
BagB = [5, 5, 6, 12]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 12, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [12, 25, 26, 26]
|
|
BagB = [12, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [12, 25, 26, 26]
|
|
A union B: [12, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [12, 25, 26, 26]
|
|
A '=' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [12, 25, 26, 26]
|
|
BagB = [5, 5, 6, 12, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [12, 25, 26, 26]
|
|
A '<' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12, 25, 26, 26]
|
|
BagB = [11, 12, 13]
|
|
A subtract B: [5, 5, 6, 25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 11, 12, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 12, 12, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12, 25, 26, 26]
|
|
BagB = [11, 11, 12, 13, 13]
|
|
A subtract B: [5, 5, 6, 25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 13, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12, 25, 26, 26]
|
|
BagB = [11, 11, 12, 12, 13, 13]
|
|
A subtract B: [5, 5, 6, 25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 11, 11, 12, 12, 13, 13, 25, 26, 26]
|
|
A union B: [5, 5, 6, 11, 11, 12, 12, 12, 13, 13, 25, 26, 26]
|
|
A intersect B: [12]
|
|
A incomparable B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12, 25, 26, 26]
|
|
BagB = [5, 5, 6]
|
|
A subtract B: [12, 25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 25, 26, 26]
|
|
A intersect B: [5, 5, 6]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12, 25, 26, 26]
|
|
BagB = [25, 26, 26]
|
|
A subtract B: [5, 5, 6, 12]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [25, 26, 26]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12, 25, 26, 26]
|
|
BagB = [5, 5, 6, 25, 26, 26]
|
|
A subtract B: [12]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [5, 5, 6, 25, 26, 26]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12, 25, 26, 26]
|
|
BagB = [5, 5, 6, 12]
|
|
A subtract B: [25, 26, 26]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 12, 25, 26, 26]
|
|
A intersect B: [5, 5, 6, 12]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12, 25, 26, 26]
|
|
BagB = [12, 25, 26, 26]
|
|
A subtract B: [5, 5, 6]
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 6, 12, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [12, 25, 26, 26]
|
|
A '>' B
|
|
-----------------------------------------
|
|
-----------------------------------------
|
|
BagA = [5, 5, 6, 12, 25, 26, 26]
|
|
BagB = [5, 5, 6, 12, 25, 26, 26]
|
|
A subtract B: []
|
|
A least_upper_bound B: [5, 5, 6, 12, 25, 26, 26]
|
|
A union B: [5, 5, 5, 5, 6, 6, 12, 12, 25, 25, 26, 26, 26, 26]
|
|
A intersect B: [5, 5, 6, 12, 25, 26, 26]
|
|
A '=' B
|
|
-----------------------------------------
|