[Issue 6718] "nWayUnion" => "nWayMerge", plus true nWayUnion

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 17 05:42:45 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=6718

--- Comment #14 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to RazvanN from comment #13)
> (In reply to Andrei Alexandrescu from comment #11)
> > >Maybe we should also rename setIntersection to multiwayIntersection
> > 
> > setIntersection has two inputs. "multiwayIntersection" would have multiple
> > inputs (a range of ranges) and would be a distinct function with important
> > uses and its own theory and practice
> > (http://www.cs.toronto.edu/~tl/papers/wea06.pdf is a good overview).
> 
> Actually, looking at the implementation, it seems that setIntersection also
> has a variable number of inputs :
> https://dlang.org/phobos/std_algorithm_setops.html#setIntersection

It has a number of inputs known during compilation. True "multi" set
intersection takes a range of ranges, i.e. an arbitrary number of sets.

--


More information about the Digitalmars-d-bugs mailing list