Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
examples::word_count Namespace Reference

Classes

struct  HashWordHasher
 

Typedefs

using HashWord = std::pair< size_t, std::string >
 
using HashWordCount = std::pair< HashWord, size_t >
 
using WordCountPair = std::pair< std::string, size_t >
 

Functions

template<typename InputStack >
auto HashWordCountExample (const DIA< std::string, InputStack > &input)
 
template<typename RandomGenerator >
std::string RandomTextWriterGenerate (size_t num_words, RandomGenerator &rng)
 
template<typename InputStack >
auto WordCount (const DIA< std::string, InputStack > &input)
 

Variables

static constexpr size_t s_num_random_text_writer_words
 
static const char * s_random_text_writer_words []
 

Typedef Documentation

using HashWord = std::pair<size_t, std::string>

Definition at line 60 of file word_count.hpp.

using HashWordCount = std::pair<HashWord, size_t>

Definition at line 61 of file word_count.hpp.

using WordCountPair = std::pair<std::string, size_t>

Definition at line 30 of file word_count.hpp.

Function Documentation

auto examples::word_count::HashWordCountExample ( const DIA< std::string, InputStack > &  input)

The second WordCount user program: reads a DIA containing std::string words, creates hash values from the words prior to reducing by hash and word. Returns a DIA containing WordCountPairs.

Definition at line 74 of file word_count.hpp.

References StringView::size(), thrill::common::SplitView(), and StringView::ToString().

Referenced by RunHashWordCount(), and RunHashWordCountGenerated().

std::string examples::word_count::RandomTextWriterGenerate ( size_t  num_words,
RandomGenerator &  rng 
)
auto examples::word_count::WordCount ( const DIA< std::string, InputStack > &  input)

The most basic WordCount user program: reads a DIA containing std::string words, and returns a DIA containing WordCountPairs.

Definition at line 35 of file word_count.hpp.

References StringView::size(), thrill::common::SplitView(), and StringView::ToString().

Variable Documentation

constexpr size_t s_num_random_text_writer_words
static
Initial value:

Definition at line 225 of file random_text_writer.hpp.

Referenced by RandomTextWriterGenerate().

const char* s_random_text_writer_words[]
static

Definition at line 28 of file random_text_writer.hpp.

Referenced by RandomTextWriterGenerate().