aitools::invertedindex::ExternalMergeSort Class Reference

#include <ExternalMergeSort.hpp>

List of all members.

Static Public Member Functions

template<typename Value >
static void sort (Postlist< Value > &postlist, Quantile &quantile, Sorting mode)

Static Public Attributes

static const size_t max_memory = 100 * 1024 * 1024

Private Types

typedef Configuration::Sorting Sorting

Private Member Functions

 ExternalMergeSort ()

Static Private Member Functions

template<typename Value >
static void partition (Postlist< Value > &postlist, Quantile &quantile, std::vector< FILE * > &buckets, Sorting mode)
template<typename Value >
static void merge (Postlist< Value > &postlist, std::vector< FILE * > &buckets, Sorting mode)
template<typename Value >
static FILE * swap_out (const std::vector< Value > &entries)

Detailed Description

A class that provides a static method to sort a huge postlist with an external n-merge-sort algorithm.

Author:
martin.trenkmann@uni-weimar.de

Created on Jun 22, 2008

Id
ExternalMergeSort.hpp,v 1.9 2010/05/11 23:41:08 trenkman Exp

Definition at line 21 of file ExternalMergeSort.hpp.


Member Typedef Documentation

Definition at line 13 of file ExternalMergeSort.hpp.


Constructor & Destructor Documentation

aitools::invertedindex::ExternalMergeSort::ExternalMergeSort (  )  [private]

Member Function Documentation

template<typename Value >
void aitools::invertedindex::ExternalMergeSort::merge ( Postlist< Value > &  postlist,
std::vector< FILE * > &  buckets,
Sorting  mode 
) [inline, static, private]
template<typename Value >
void aitools::invertedindex::ExternalMergeSort::partition ( Postlist< Value > &  postlist,
Quantile quantile,
std::vector< FILE * > &  buckets,
Sorting  mode 
) [inline, static, private]
template<typename Value >
void aitools::invertedindex::ExternalMergeSort::sort ( Postlist< Value > &  postlist,
Quantile quantile,
Sorting  mode 
) [inline, static]

Definition at line 62 of file ExternalMergeSort.hpp.

References aitools::invertedindex::Configuration::DISABLED, max_memory, merge(), partition(), and aitools::invertedindex::Postlist< Value >::payload().

Referenced by partition(), and aitools::invertedindex::PostlistSorter::sort().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Value >
FILE * aitools::invertedindex::ExternalMergeSort::swap_out ( const std::vector< Value > &  entries  )  [inline, static, private]

Definition at line 163 of file ExternalMergeSort.hpp.

References aitools::invertedindex::ByteBuffer::data(), aitools::util::fwrite(), aitools::invertedindex::ByteBuffer::size(), and aitools::invertedindex::System::tmpfile().

Referenced by partition().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

const size_t aitools::invertedindex::ExternalMergeSort::max_memory = 100 * 1024 * 1024 [static]

The documentation for this class was generated from the following file:
Generated on Wed May 30 15:07:33 2012 by  doxygen 1.6.3