libkleo
stl_util.h
Go to the documentation of this file.
79 OutputIterator copy_if( InputIterator first, InputIterator last, OutputIterator dest, UnaryPredicate pred ) {
90 template <typename OutputIterator, typename InputIterator, typename UnaryFunction, typename UnaryPredicate>
91 OutputIterator transform_if( InputIterator first, InputIterator last, OutputIterator dest, UnaryPredicate pred, UnaryFunction filter ) {
99 return std::copy( boost::make_transform_iterator( first, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
100 boost::make_transform_iterator( last, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
106 return std::copy( boost::make_transform_iterator( first, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
107 boost::make_transform_iterator( last, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
112 OutputIterator copy_1st_if( InputIterator first, InputIterator last, OutputIterator dest, Predicate pred ) {
113 return kdtools::copy_if( boost::make_transform_iterator( first, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
114 boost::make_transform_iterator( last, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
119 OutputIterator copy_2nd_if( InputIterator first, InputIterator last, OutputIterator dest, Predicate pred ) {
120 return kdtools::copy_if( boost::make_transform_iterator( first, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
121 boost::make_transform_iterator( last, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
126 OutputIterator transform_1st( InputIterator first, InputIterator last, OutputIterator dest, UnaryFunction func ) {
127 return std::transform( boost::make_transform_iterator( first, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
128 boost::make_transform_iterator( last, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
133 OutputIterator transform_2nd( InputIterator first, InputIterator last, OutputIterator dest, UnaryFunction func ) {
134 return std::transform( boost::make_transform_iterator( first, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
135 boost::make_transform_iterator( last, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
140 Value accumulate_if( InputIterator first, InputIterator last, UnaryPredicate filter, const Value & value=Value() ) {
145 template <typename Value, typename InputIterator, typename UnaryPredicate, typename BinaryOperation>
146 Value accumulate_if( InputIterator first, InputIterator last, UnaryPredicate filter, const Value & value, BinaryOperation op ) {
152 Value accumulate_transform( InputIterator first, InputIterator last, UnaryFunction map, const Value & value=Value() ) {
157 template <typename Value, typename InputIterator, typename UnaryFunction, typename BinaryOperation>
158 Value accumulate_transform( InputIterator first, InputIterator last, UnaryFunction map, const Value & value, BinaryOperation op ) {
163 template <typename Value, typename InputIterator, typename UnaryFunction, typename UnaryPredicate>
164 Value accumulate_transform_if( InputIterator first, InputIterator last, UnaryFunction map, UnaryPredicate pred, const Value & value=Value() ) {
169 template <typename Value, typename InputIterator, typename UnaryFunction, typename UnaryPredicate, typename BinaryOperation>
170 Value accumulate_transform_if( InputIterator first, InputIterator last, UnaryFunction map, UnaryPredicate filter, const Value & value, BinaryOperation op ) {
171 return std::accumulate( boost::make_transform_iterator( boost::make_filter_iterator( filter, first, last ), map ),
172 boost::make_transform_iterator( boost::make_filter_iterator( filter, last, last ), map ), value, op );
175 template <typename InputIterator, typename OutputIterator1, typename OutputIterator2, typename UnaryPredicate>
176 std::pair<OutputIterator1,OutputIterator2> separate_if( InputIterator first, InputIterator last, OutputIterator1 dest1, OutputIterator2 dest2, UnaryPredicate pred ) {
241 BinaryOperation for_each_adjacent_pair( InputIterator first, InputIterator last, BinaryOperation op ) {
255 UnaryFunction for_each_if( ForwardIterator first, ForwardIterator last, UnaryPredicate pred, UnaryFunction func ) {
265 template <typename ForwardIterator, typename ForwardIterator2, typename OutputIterator, typename BinaryPredicate>
266 OutputIterator set_intersection( ForwardIterator first1, ForwardIterator last1, ForwardIterator2 first2, ForwardIterator2 last2, OutputIterator result ) {
282 template <typename ForwardIterator, typename ForwardIterator2, typename OutputIterator, typename BinaryPredicate>
283 OutputIterator set_intersection( ForwardIterator first1, ForwardIterator last1, ForwardIterator2 first2, ForwardIterator2 last2, OutputIterator result, BinaryPredicate pred ) {
BinaryOperation for_each_adjacent_pair(InputIterator first, InputIterator last, BinaryOperation op)
Definition: stl_util.h:241
boost::range_const_iterator< C >::type find_if(const C &c, P p)
Definition: stl_util.h:343
boost::call_traits< U >::param_type operator()(const std::pair< U, V > &pair) const
Definition: stl_util.h:63
OutputIterator transform_if(InputIterator first, InputIterator last, OutputIterator dest, UnaryPredicate pred, UnaryFunction filter)
Definition: stl_util.h:91
QString map(const char *token, int subtoken)
Definition: qgpgmeprogresstokenmapper.cpp:91
Value accumulate_transform(InputIterator first, InputIterator last, UnaryFunction map, const Value &value=Value())
Definition: stl_util.h:152
OutputIterator copy_if(InputIterator first, InputIterator last, OutputIterator dest, UnaryPredicate pred)
Definition: stl_util.h:79
OutputIterator transform_1st(InputIterator first, InputIterator last, OutputIterator dest, UnaryFunction func)
Definition: stl_util.h:126
OutputIterator copy_1st(InputIterator first, InputIterator last, OutputIterator dest)
Definition: stl_util.h:98
Definition: stl_util.h:39
OutputIterator transform_2nd(InputIterator first, InputIterator last, OutputIterator dest, UnaryFunction func)
Definition: stl_util.h:133
std::pair< OutputIterator1, OutputIterator2 > separate_if(InputIterator first, InputIterator last, OutputIterator1 dest1, OutputIterator2 dest2, UnaryPredicate pred)
Definition: stl_util.h:176
Definition: stl_util.h:67
UnaryFunction for_each_if(ForwardIterator first, ForwardIterator last, UnaryPredicate pred, UnaryFunction func)
Definition: stl_util.h:255
OutputIterator set_intersection(ForwardIterator first1, ForwardIterator last1, ForwardIterator2 first2, ForwardIterator2 last2, OutputIterator result)
Versions of std::set_intersection optimized for ForwardIterator's.
Definition: stl_util.h:266
OutputIterator transform(const I &i, OutputIterator out, P p)
Definition: stl_util.h:382
Value accumulate_transform_if(InputIterator first, InputIterator last, UnaryFunction map, UnaryPredicate pred, const Value &value=Value())
Definition: stl_util.h:164
OutputIterator copy_2nd_if(InputIterator first, InputIterator last, OutputIterator dest, Predicate pred)
Definition: stl_util.h:119
boost::range_const_iterator< C >::type find(const C &c, const V &v)
Definition: stl_util.h:329
Definition: stl_util.h:44
bool set_intersects(ForwardIterator first1, ForwardIterator last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred)
Definition: stl_util.h:301
Value accumulate_if(InputIterator first, InputIterator last, UnaryPredicate filter, const Value &value=Value())
Definition: stl_util.h:140
OutputIterator copy_2nd(InputIterator first, InputIterator last, OutputIterator dest)
Definition: stl_util.h:105
Definition: stl_util.h:56
boost::call_traits< V >::param_type operator()(const std::pair< U, V > &pair) const
Definition: stl_util.h:74
OutputIterator copy_1st_if(InputIterator first, InputIterator last, OutputIterator dest, Predicate pred)
Definition: stl_util.h:112
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:57:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:57:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.