filter |
Functions | |
template<typename I , typename O , typename F > | |
O | filter (I first, I last, O result, F op) |
template<typename I , typename O , typename F > | |
O | filter (const I &source, O result, F op) |
template<typename I , typename O , typename F > | |
O | filter (I &source, O result, F op) |
Detailed Description
Filter is similar to std::tranform
. The op
function is passed an instance of an output_iterator and can generate more than (or fewer than) a single result.
The op
function is called once for each item in the range [first, last)
. The result
parameter is passed into the first call to op
, the result of op
is passed to subsequent calls to op
.
- See also:
- std::transform, std::remove
- Requirements:
- I models input_iterator.
- O models output_iterator.
- F models ConvertibleToFunction with signature O op(value_type(I), O)
[first, last) is a valid range.
- Returns:
- Result of last invocation of
op
orresult
if[first, last)
is empty.
- Complexity Guarantees:
- Linear. Exactly
distance(first, last)
calls toop
.
Function Documentation
O adobe::filter | ( | I | first, |
I | last, | ||
O | result, | ||
F | op | ||
) |
filter implementation
Definition at line 82 of file filter.hpp.
O adobe::filter | ( | const I & | source, |
O | result, | ||
F | op | ||
) |
filter implementation
Definition at line 108 of file filter.hpp.
O adobe::filter | ( | I & | source, |
O | result, | ||
F | op | ||
) |
filter implementation
Definition at line 95 of file filter.hpp.