Thrill  0.1
Local Operations (LOps)

Functions

template<typename FirstDIA , typename... DIAs>
auto Union (const FirstDIA &first_dia, const DIAs &... dias)
 Union is a LOp, which creates the union of all items from any number of DIAs as a single DIA, where the items are in an arbitrary order. More...
 
template<typename ValueType >
auto Union (const std::initializer_list< DIA< ValueType > > &dias)
 Union is a LOp, which creates the union of all items from any number of DIAs as a single DIA, where the items are in an arbitrary order. More...
 
template<typename ValueType >
auto Union (const std::vector< DIA< ValueType > > &dias)
 Union is a LOp, which creates the union of all items from any number of DIAs as a single DIA, where the items are in an arbitrary order. More...
 

Local Operations (LOps)

template<typename MapFunction >
auto Map (const MapFunction &map_function) const
 Map applies map_function : \( A \to B \) to each item of a DIA and delivers a new DIA contains the returned values, which may be of a different type. More...
 
template<typename FilterFunction >
auto Filter (const FilterFunction &filter_function) const
 Each item of a DIA is tested using filter_function : \( A \to \textrm{bool} \) to determine whether it is copied into the output DIA or excluded. More...
 
template<typename ResultType = ValueType, typename FlatmapFunction >
auto FlatMap (const FlatmapFunction &flatmap_function) const
 Each item of a DIA is expanded by the flatmap_function : \( A \to \textrm{array}(B) \) to zero or more items of different type, which are concatenated in the resulting DIA. More...
 
auto BernoulliSample (double p) const
 Each item of a DIA is copied into the output DIA with success probability p (an independent Bernoulli trial). More...
 
template<typename SecondDIA >
auto Union (const SecondDIA &second_dia) const
 Union is a LOp, which creates the union of all items from any number of DIAs as a single DIA, where the items are in an arbitrary order. More...
 

Detailed Description

Function Documentation

◆ BernoulliSample()

auto BernoulliSample ( double  p) const

Each item of a DIA is copied into the output DIA with success probability p (an independent Bernoulli trial).

Definition at line 90 of file bernoulli_sample.hpp.

Referenced by examples::select::PickPivots().

◆ Filter()

auto Filter ( const FilterFunction &  filter_function) const
inline

Each item of a DIA is tested using filter_function : \( A \to \textrm{bool} \) to determine whether it is copied into the output DIA or excluded.

Filter.svg

The function chain of the returned DIA is this DIA's stack_ chained with filter_function.

Parameters
filter_functionFilter function of type FilterFunction, which maps each element to a boolean.

Definition at line 405 of file dia.hpp.

Referenced by outputBFSResult(), examples::suffix_sorting::PrefixDoublingSorting(), examples::suffix_sorting::PrefixDoublingWindow(), and examples::select::Select().

◆ FlatMap()

auto FlatMap ( const FlatmapFunction &  flatmap_function) const
inline

Each item of a DIA is expanded by the flatmap_function : \( A \to \textrm{array}(B) \) to zero or more items of different type, which are concatenated in the resulting DIA.

The return type of flatmap_function must be specified as template parameter.

FlatMap.svg

FlatMap is a LOp, which maps this DIA according to the flatmap_function given by the user. The flatmap_function maps each element to elements of a possibly different type. The flatmap_function has an emitter function as it's second parameter. This emitter is called once for each element to be emitted. The function chain of the returned DIA is this DIA's stack_ chained with flatmap_function.

Template Parameters
ResultTypeResultType of the FlatmapFunction, if different from item type of DIA.
Parameters
flatmap_functionMap function of type FlatmapFunction, which maps each element to elements of a possibly different type.

Definition at line 458 of file dia.hpp.

Referenced by BFSNextLevel().

◆ Map()

auto Map ( const MapFunction &  map_function) const
inline

Map applies map_function : \( A \to B \) to each item of a DIA and delivers a new DIA contains the returned values, which may be of a different type.

The function chain of the returned DIA is this DIA's stack_ chained with map_fn.

Parameters
map_functionMap function of type MapFunction, which maps each element to an element of a possibly different type.

Definition at line 358 of file dia.hpp.

Referenced by examples::suffix_sorting::ConstructWaveletTree(), examples::suffix_sorting::DC3Recursive(), doubleSweepDiameter(), examples::suffix_sorting::PrefixDoublingSorting(), examples::suffix_sorting::PrefixDoublingWindow(), examples::suffix_sorting::PrefixQuadrupling(), PrepareNextTree(), Process(), and examples::select::Select().

◆ Union() [1/4]

auto thrill::api::Union ( const FirstDIA &  first_dia,
const DIAs &...  dias 
)

Union is a LOp, which creates the union of all items from any number of DIAs as a single DIA, where the items are in an arbitrary order.

All input DIAs must contain the same type, which is also the output DIA's type.

The Union operation concatenates all local pieces of a DIA, no rebalancing is performed, and no communication is needed.

Parameters
first_diafirst DIA
diasDIAs, which are unified with the first DIA.

Definition at line 319 of file union.hpp.

References tlx::vexpand().

Referenced by examples::suffix_sorting::DC3Recursive(), examples::suffix_sorting::DC7Recursive(), DIA< BfsNode >::FlatMap(), examples::suffix_sorting::PrefixDoublingDiscarding(), examples::suffix_sorting::PrefixQuadruplingDiscarding(), and DIA< BfsNode >::Union().

◆ Union() [2/4]

auto thrill::api::Union ( const std::initializer_list< DIA< ValueType > > &  dias)

Union is a LOp, which creates the union of all items from any number of DIAs as a single DIA, where the items are in an arbitrary order.

All input DIAs must contain the same type, which is also the output DIA's type.

The Union operation concatenates all local pieces of a DIA, no rebalancing is performed, and no communication is needed.

Parameters
diasDIAs, which are unified.

Definition at line 343 of file union.hpp.

◆ Union() [3/4]

auto thrill::api::Union ( const std::vector< DIA< ValueType > > &  dias)

Union is a LOp, which creates the union of all items from any number of DIAs as a single DIA, where the items are in an arbitrary order.

All input DIAs must contain the same type, which is also the output DIA's type.

The Union operation concatenates all local pieces of a DIA, no rebalancing is performed, and no communication is needed.

Parameters
diasDIAs, which are unified.

Definition at line 366 of file union.hpp.

◆ Union() [4/4]

auto Union ( const SecondDIA< ValueType_, Stack_ > &  second_dia) const

Union is a LOp, which creates the union of all items from any number of DIAs as a single DIA, where the items are in an arbitrary order.

All input DIAs must contain the same type, which is also the output DIA's type.

The Union operation concatenates all local pieces of a DIA, no rebalancing is performed, and no communication is needed.

Definition at line 378 of file union.hpp.