Intersections.jl
Intersections.jl is a library for computing intersections for sets represented as sorted lists. It also implements some union algorithms.
bk: (Barbay & Kenyon-Mathieu) algorithm, for $k$ setsbaezayates: (Baeza-Yates) intersection algorithm, for two setssvs: small vs small strategy for $k$ sets, it follows a parametric approach on the 2-set intersection problem.imerge2: Intersection using a merge-like algorithm for two setsumerge: union algorithm based on merge, for $k$ sets
Some algorithms are also parametric on the accepted search algorithm. In particular, this package also provides a few search algorithms
binarysearch: typical bounded binary searchdoublingsearch: unbounded search (galloping) (expects the insertion position near to starting point)doublingsearchrev: idem. but galloping from right to left (expects the insertion position be close to the end position)seqsearch: sequential searchseqsearchrev: reverse sequential search
In particular, bk and umerge can be used along with callbacks to avoid storing output sets.
[TODO] Add proper references