105#ifndef __ADS_SortedIntersection
106 #define __ADS_SortedIntersection
150template<
class T ,
class C = std::less<> >
152 const std::vector< T > & B , C less = C() );
173template<
class T ,
class C = std::less<> >
175 const std::vector< T > & B ,
204template<
class T ,
class C = std::less<> >
206 const std::vector< T > & B ,
231template<
class T ,
class C = std::less<> >
233 const std::vector< T > & B ,
262template<
class T ,
class C = std::less<> >
264 const std::vector< T > & B ,
293template<
class T ,
class C = std::less<> >
322template<
class T ,
class C = std::less<> >
356 std::size_t L , std::uint64_t a , std::uint64_t c );
359 [[nodiscard]] std::size_t
size(
void )
const;
362 [[nodiscard]] std::size_t
buckets(
void )
const;
390 [[nodiscard]] std::vector< std::uint64_t >
392 std::size_t * scanned =
nullptr )
const;
395 [[nodiscard]] std::vector< std::uint64_t >
values(
void )
const;
400 [[nodiscard]] std::uint64_t mask(
void )
const;
403 [[nodiscard]] std::uint64_t permute( std::uint64_t x )
const;
406 [[nodiscard]] std::uint64_t invert( std::uint64_t y )
const;
410 std::uint64_t f_a , f_c;
411 std::uint64_t f_ainv;
412 std::vector< std::uint64_t > f_img;
413 std::vector< std::size_t > f_off;
425#include "ADS/set/impl/SortedIntersection.tpp"
The binary search of section 1.2 in a sorted vector : is compared with the middle item of the part ...
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The checks of the contracts of the sorts [see Contract.h]: a copy of the input kept only when the aud...
The two-level memory model of Aggarwal and Vitter, simulated so that the algorithms of the external m...
a file of items on the disk of the model, in blocks of items
Definition TwoLevelMemory.h:199
std::vector< std::uint64_t > intersect(const PermutedBuckets &other, std::size_t *scanned=nullptr) const
the values common to the two sets, sorted; the items of the two sets looked at go to *scanned,...
PermutedBuckets(const std::vector< std::uint64_t > &A, unsigned w, std::size_t L, std::uint64_t a, std::uint64_t c)
the values of , distinct, in any order
std::size_t buckets(void) const
the buckets,
std::size_t size(void) const
the items
std::vector< std::uint64_t > values(void) const
the values of the set, sorted, by inverting the permutation
std::vector< T > intersectDoubling(const std::vector< T > &A, const std::vector< T > &B, C less=C())
the items common to and , by doubling searches
std::vector< T > intersectMutualPartition(const std::vector< T > &A, const std::vector< T > &B, C less=C())
the items common to and , by mutual partitions
std::vector< T > intersectBinarySearch(const std::vector< T > &A, const std::vector< T > &B, C less=C())
the items common to and , by a binary search in the longer list of each item of the shorter one
void twoLevelHeaders(const DiskFile< T > &A, std::size_t L, DiskFile< T > &H)
the first item of each block of items of , into , by one scan
void intersectTwoLevelExternal(const DiskFile< T > &A, const DiskFile< T > &H, std::size_t L, const DiskFile< T > &B, DiskFile< T > &out, C less=C())
the items common to the sorted files and into out, by the headers of the blocks of items of [see...
std::vector< T > intersectTwoLevel(const std::vector< T > &A, const std::vector< T > &B, std::size_t L, C less=C())
the items common to and , by the first items of the blocks of items of
void intersectMergeExternal(const DiskFile< T > &A, const DiskFile< T > &B, DiskFile< T > &out, C less=C())
the items common to the sorted files and into out, by merging, reads
std::vector< T > intersectMerge(const std::vector< T > &A, const std::vector< T > &B, C less=C())
the items common to and , by merging