util::stream::Sorts< Compare, Combine > Class Template Reference

#include <sort.hh>

Inheritance diagram for util::stream::Sorts< Compare, Combine >:

Inheritance graph
[legend]
Collaboration diagram for util::stream::Sorts< Compare, Combine >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Sorts ()
 Sorts (std::size_t number)
void push_back (util::stream::Chain &chain, const util::stream::SortConfig &config, const Compare &compare=Compare(), const Combine &combine=Combine())


Detailed Description

template<class Compare, class Combine = NeverCombine>
class util::stream::Sorts< Compare, Combine >

Represents an array capable of storing Sort objects.

In the anticipated use case, an instance of this class will maintain one Sort object for each n-gram order (ranging from 1 up to the maximum n-gram order being processed). Use in this manner would enable the n-grams each n-gram order to be sorted, in parallel.

Template Parameters:
Compare An ngram comparator to use during sorting.

Definition at line 557 of file sort.hh.


Constructor & Destructor Documentation

template<class Compare, class Combine = NeverCombine>
util::stream::Sorts< Compare, Combine >::Sorts (  )  [inline]

Constructs, but does not initialize.

Init must be called before use.

See also:
util::FixedArray::Init()

Definition at line 570 of file sort.hh.

template<class Compare, class Combine = NeverCombine>
util::stream::Sorts< Compare, Combine >::Sorts ( std::size_t  number  )  [inline, explicit]

Constructs an array capable of storing a fixed number of Sort objects.

Parameters:
number The maximum number of sorters that can be held by this array
See also:
util::FixedArray::FixedArray()

Definition at line 578 of file sort.hh.


Member Function Documentation

template<class Compare, class Combine = NeverCombine>
void util::stream::Sorts< Compare, Combine >::push_back ( util::stream::Chain chain,
const util::stream::SortConfig config,
const Compare &  compare = Compare(),
const Combine &  combine = Combine() 
) [inline]

Constructs a new Sort object which is stored in this array.

The new Sort object is constructed using the provided SortConfig and ngram comparator; once constructed, a new worker thread (owned by the chain) will sort the n-gram data stored in the blocks of the provided chain.

See also:
util::stream::Sort::Sort()

util::stream::Chain::operator>>()

Definition at line 590 of file sort.hh.

References util::FixedArray< T >::Constructed(), and util::FixedArray< T >::end().

Here is the call graph for this function:


The documentation for this class was generated from the following file:

Generated on Thu Jul 6 00:34:55 2017 for Moses by  doxygen 1.5.9