libkleo
stl_util.h
Go to the documentation of this file.
81 OutputIterator copy_if( InputIterator first, InputIterator last, OutputIterator dest, UnaryPredicate pred ) {
92 template <typename OutputIterator, typename InputIterator, typename UnaryFunction, typename UnaryPredicate>
93 OutputIterator transform_if( InputIterator first, InputIterator last, OutputIterator dest, UnaryPredicate pred, UnaryFunction filter ) {
101 return std::copy( boost::make_transform_iterator( first, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
102 boost::make_transform_iterator( last, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
108 return std::copy( boost::make_transform_iterator( first, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
109 boost::make_transform_iterator( last, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
114 OutputIterator copy_1st_if( InputIterator first, InputIterator last, OutputIterator dest, Predicate pred ) {
115 return kdtools::copy_if( boost::make_transform_iterator( first, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
116 boost::make_transform_iterator( last, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
121 OutputIterator copy_2nd_if( InputIterator first, InputIterator last, OutputIterator dest, Predicate pred ) {
122 return kdtools::copy_if( boost::make_transform_iterator( first, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
123 boost::make_transform_iterator( last, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
128 OutputIterator transform_1st( InputIterator first, InputIterator last, OutputIterator dest, UnaryFunction func ) {
129 return std::transform( boost::make_transform_iterator( first, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
130 boost::make_transform_iterator( last, select1st<typename std::iterator_traits<InputIterator>::value_type>() ),
135 OutputIterator transform_2nd( InputIterator first, InputIterator last, OutputIterator dest, UnaryFunction func ) {
136 return std::transform( boost::make_transform_iterator( first, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
137 boost::make_transform_iterator( last, select2nd<typename std::iterator_traits<InputIterator>::value_type>() ),
142 Value accumulate_if( InputIterator first, InputIterator last, UnaryPredicate filter, const Value & value=Value() ) {
147 template <typename Value, typename InputIterator, typename UnaryPredicate, typename BinaryOperation>
148 Value accumulate_if( InputIterator first, InputIterator last, UnaryPredicate filter, const Value & value, BinaryOperation op ) {
154 Value accumulate_transform( InputIterator first, InputIterator last, UnaryFunction map, const Value & value=Value() ) {
159 template <typename Value, typename InputIterator, typename UnaryFunction, typename BinaryOperation>
160 Value accumulate_transform( InputIterator first, InputIterator last, UnaryFunction map, const Value & value, BinaryOperation op ) {
165 template <typename Value, typename InputIterator, typename UnaryFunction, typename UnaryPredicate>
166 Value accumulate_transform_if( InputIterator first, InputIterator last, UnaryFunction map, UnaryPredicate pred, const Value & value=Value() ) {
171 template <typename Value, typename InputIterator, typename UnaryFunction, typename UnaryPredicate, typename BinaryOperation>
172 Value accumulate_transform_if( InputIterator first, InputIterator last, UnaryFunction map, UnaryPredicate filter, const Value & value, BinaryOperation op ) {
173 return std::accumulate( boost::make_transform_iterator( boost::make_filter_iterator( filter, first, last ), map ),
174 boost::make_transform_iterator( boost::make_filter_iterator( filter, last, last ), map ), value, op );
177 template <typename InputIterator, typename OutputIterator1, typename OutputIterator2, typename UnaryPredicate>
178 std::pair<OutputIterator1,OutputIterator2> separate_if( InputIterator first, InputIterator last, OutputIterator1 dest1, OutputIterator2 dest2, UnaryPredicate pred ) {
243 BinaryOperation for_each_adjacent_pair( InputIterator first, InputIterator last, BinaryOperation op ) {
257 UnaryFunction for_each_if( ForwardIterator first, ForwardIterator last, UnaryPredicate pred, UnaryFunction func ) {
267 template <typename ForwardIterator, typename ForwardIterator2, typename OutputIterator, typename BinaryPredicate>
268 OutputIterator set_intersection( ForwardIterator first1, ForwardIterator last1, ForwardIterator2 first2, ForwardIterator2 last2, OutputIterator result ) {
284 template <typename ForwardIterator, typename ForwardIterator2, typename OutputIterator, typename BinaryPredicate>
285 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:243
boost::range_const_iterator< C >::type find_if(const C &c, P p)
Definition: stl_util.h:345
boost::call_traits< U >::param_type operator()(const std::pair< U, V > &pair) const
Definition: stl_util.h:65
OutputIterator transform_if(InputIterator first, InputIterator last, OutputIterator dest, UnaryPredicate pred, UnaryFunction filter)
Definition: stl_util.h:93
QString map(const char *token, int subtoken)
Definition: qgpgmeprogresstokenmapper.cpp:93
Value accumulate_transform(InputIterator first, InputIterator last, UnaryFunction map, const Value &value=Value())
Definition: stl_util.h:154
OutputIterator copy_if(InputIterator first, InputIterator last, OutputIterator dest, UnaryPredicate pred)
Definition: stl_util.h:81
OutputIterator transform_1st(InputIterator first, InputIterator last, OutputIterator dest, UnaryFunction func)
Definition: stl_util.h:128
OutputIterator copy_1st(InputIterator first, InputIterator last, OutputIterator dest)
Definition: stl_util.h:100
Definition: stl_util.h:41
OutputIterator transform_2nd(InputIterator first, InputIterator last, OutputIterator dest, UnaryFunction func)
Definition: stl_util.h:135
std::pair< OutputIterator1, OutputIterator2 > separate_if(InputIterator first, InputIterator last, OutputIterator1 dest1, OutputIterator2 dest2, UnaryPredicate pred)
Definition: stl_util.h:178
Definition: stl_util.h:69
UnaryFunction for_each_if(ForwardIterator first, ForwardIterator last, UnaryPredicate pred, UnaryFunction func)
Definition: stl_util.h:257
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:268
OutputIterator transform(const I &i, OutputIterator out, P p)
Definition: stl_util.h:384
Value accumulate_transform_if(InputIterator first, InputIterator last, UnaryFunction map, UnaryPredicate pred, const Value &value=Value())
Definition: stl_util.h:166
OutputIterator copy_2nd_if(InputIterator first, InputIterator last, OutputIterator dest, Predicate pred)
Definition: stl_util.h:121
boost::range_const_iterator< C >::type find(const C &c, const V &v)
Definition: stl_util.h:331
Definition: stl_util.h:46
bool set_intersects(ForwardIterator first1, ForwardIterator last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred)
Definition: stl_util.h:303
Value accumulate_if(InputIterator first, InputIterator last, UnaryPredicate filter, const Value &value=Value())
Definition: stl_util.h:142
OutputIterator copy_2nd(InputIterator first, InputIterator last, OutputIterator dest)
Definition: stl_util.h:107
Definition: stl_util.h:58
boost::call_traits< V >::param_type operator()(const std::pair< U, V > &pair) const
Definition: stl_util.h:76
OutputIterator copy_1st_if(InputIterator first, InputIterator last, OutputIterator dest, Predicate pred)
Definition: stl_util.h:114
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.