#include <rangelib/basic_indirect_range_adaptor.hpp>
Public Types | |
typedef R | range_type |
typedef R::value_type | value_type |
Public Member Functions | |
indirect_range_adaptor (range_type r) | |
Constructor. | |
template<typename T> | |
T | accumulate (T val) const |
Returns the sum of val and the value of each element in the range. | |
template<typename T, typename P> | |
T | accumulate (T val, P pr) const |
Returns the sum of val and the value of pr applied to each element in the range. | |
template<typename O> | |
O | copy (O o) const |
Copies each element in the range to the output iterator o . | |
template<typename O, typename P> | |
O | copy_if (O o, P pr) const |
Copies each element in the range that satisfies predicate pr to the output iterator o . | |
template<typename T> | |
size_t | count (T const &val) const |
Returns the number of elements in the range that evaluate equal to val . | |
template<typename P> | |
size_t | count_if (P pr) const |
Returns the number of elements in the range matching the predicate pr . | |
ptrdiff_t | distance () const |
Returns the number of elements in the range. | |
template<typename F> | |
F | for_each (F f) |
Applied the functor f to each element in the array. | |
template<typename T> | |
bool | exists (T const &val) const |
Returns true if the element val exists in the range. | |
template<typename P> | |
bool | exists_if (P pr) const |
Returns true if any element in given predicate pr evaluates true any element in the range. | |
template<typename P, typename T> | |
bool | exists_if (P pr, T &result) const |
Returns true if any element in given predicate pr evaluates true any element in the range, and places the matching element in result . | |
value_type | max_element () const |
Returns the value of the maximum elements in the range. | |
template<typename P> | |
value_type | max_element (P pr) const |
Returns the value of the maximum elements in the range, as determined by the comparand predicate pr . | |
value_type | min_element () const |
Returns the value of the minimum elements in the range. | |
template<typename P> | |
value_type | min_element (P pr) const |
Returns the value of the minimum elements in the range, as determined by the comparand predicate pr . |
indirect_range_adaptor | ( | range_type | r | ) | [inline] |
Constructor.
r | The Basic Indirect range instance to be adapted |
T accumulate | ( | T | val | ) | const [inline] |
Returns the sum of val
and the value of each element in the range.
T accumulate | ( | T | val, | |
P | pr | |||
) | const [inline] |
Returns the sum of val
and the value of pr applied to each element in the range.
O copy | ( | O | o | ) | const [inline] |
Copies each element in the range to the output iterator o
.
O copy_if | ( | O | o, | |
P | pr | |||
) | const [inline] |
Copies each element in the range that satisfies predicate pr
to the output iterator o
.
size_t count | ( | T const & | val | ) | const [inline] |
Returns the number of elements in the range that evaluate equal to val
.
size_t count_if | ( | P | pr | ) | const [inline] |
Returns the number of elements in the range matching the predicate pr
.
ptrdiff_t distance | ( | ) | const [inline] |
Returns the number of elements in the range.
F for_each | ( | F | f | ) | [inline] |
Applied the functor f
to each element in the array.
bool exists | ( | T const & | val | ) | const [inline] |
Returns true if the element val
exists in the range.
bool exists_if | ( | P | pr | ) | const [inline] |
Returns true if any element in given predicate pr
evaluates true any element in the range.
bool exists_if | ( | P | pr, | |
T & | result | |||
) | const [inline] |
Returns true if any element in given predicate pr
evaluates true any element in the range, and places the matching element in result
.
value_type max_element | ( | ) | const [inline] |
Returns the value of the maximum elements in the range.
value_type max_element | ( | P | pr | ) | const [inline] |
Returns the value of the maximum elements in the range, as determined by the comparand predicate pr
.
value_type min_element | ( | ) | const [inline] |
Returns the value of the minimum elements in the range.
value_type min_element | ( | P | pr | ) | const [inline] |
Returns the value of the minimum elements in the range, as determined by the comparand predicate pr
.