Thrill  0.1
Local Operations (LOps)
Collaboration diagram for 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...

## Function Documentation

 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.

 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.

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

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

Definition at line 386 of file dia.hpp.

 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 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
 ResultType ResultType of the FlatmapFunction, if different from item type of DIA.
Parameters
 flatmap_function Map function of type FlatmapFunction, which maps each element to elements of a possibly different type.

Definition at line 437 of file dia.hpp.

 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_function Map function of type MapFunction, which maps each element to an element of a possibly different type.

Definition at line 341 of file dia.hpp.

 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_dia first DIA dias DIAs, which are unified with the first DIA.

Definition at line 320 of file union.hpp.

References tlx::vexpand().

 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
 dias DIAs, which are unified.

Definition at line 344 of file union.hpp.

 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
 dias DIAs, which are unified.

Definition at line 367 of file union.hpp.

 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 379 of file union.hpp.

References thrill::api::Union().