96#ifndef __ADS_ListRanking
97 #define __ADS_ListRanking
126[[nodiscard]]
inline bool isList(
const std::vector< std::size_t > & succ );
145[[nodiscard]]
inline std::vector< std::size_t >
146listRank(
const std::vector< std::size_t > & succ );
170[[nodiscard]]
inline std::vector< std::size_t >
172 std::size_t * rounds =
nullptr );
219[[nodiscard]]
inline std::vector< int >
221 std::size_t * rounds =
nullptr );
242[[nodiscard]]
inline std::vector< bool >
244 const std::vector< int > & color );
280std::vector< std::size_t >
282 bool deterministic =
false ,
283 std::size_t * levels =
nullptr );
315template<
class T ,
class Op >
318 const DiskFile< std::pair< std::size_t , std::size_t > > & ops , Op op ,
349 std::size_t * rounds =
nullptr );
384 std::size_t * levels =
nullptr );
394#include "ADS/external/impl/ListRanking.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 sort of atomic items in the two-level memory [see TwoLevelMemory.h], by merging and by distribut...
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
void parallelStep(const DiskFile< T > &A, const DiskFile< std::pair< std::size_t, std::size_t > > &ops, Op op, DiskFile< T > &out)
for each pair of ops, for the of no pair, the values of read before any change; two sorts and thr...
bool isList(const std::vector< std::size_t > &succ)
whether is a list: one tail with , and every item reached from the only item that is no successor
std::vector< bool > randomIndependentSet(const std::vector< std::size_t > &succ, R &g)
the heads whose successor shows tails, a coin per item drawn by g
void externalPointerJumping(const DiskFile< std::size_t > &succ, DiskFile< std::size_t > &rank, std::size_t *rounds=nullptr)
the ranks of the list succ into rank, by pointer jumping, each round a parallelStep(); the rounds go ...
std::vector< std::size_t > listRankIndependentSet(const std::vector< std::size_t > &succ, R &g, bool deterministic=false, std::size_t *levels=nullptr)
the distances from the tail, by removing independent sets, random ones drawn by g or,...
std::vector< bool > independentSetOfColors(const std::vector< std::size_t > &succ, const std::vector< int > &color)
the items whose color is smaller than those of their neighbors, the tail excluded and not counted as ...
void externalListRank(const DiskFile< std::size_t > &succ, DiskFile< std::size_t > &rank, R &g, std::size_t *levels=nullptr)
the ranks of the list succ into rank, by removing random independent sets drawn by g; the levels of t...
std::vector< int > deterministicCoinTossing(const std::vector< std::size_t > &succ, std::size_t *rounds=nullptr)
three colors in , by deterministic coin tossing; the rounds down to six colors go to *rounds,...
std::vector< std::size_t > listRank(const std::vector< std::size_t > &succ)
the distances from the tail, by the predecessors and a walk back
std::vector< std::size_t > listRankPointerJumping(const std::vector< std::size_t > &succ, std::size_t *rounds=nullptr)
the distances from the tail, by pointer jumping; the rounds go to *rounds, if given