Combining

The methods in this section iterate across the entire container.
Member Description
template<typename FCombine>T combine(FCombine fcombine)

Requires: Parameter fcombine should be an associative binary functor with the signature T(T,T) or T(const T&,const T&).

Effects: Computes reduction over all elements using binary functor fcombine. If there are no elements, creates the result using the same rules as for creating a thread-local element.

Returns: Result of the reduction.

template<typename Func> void combine_each(Func f)

Requires: Parameter f should be a unary functor with the signature void(T) or void(const T&).

Effects: Evaluates f(x) for each instance x of T in *this.