|
rah
|
Namespaces | |
| details | |
Classes | |
| struct | chunk_iterator |
| struct | concat_iterator |
| struct | counted_iterator |
| struct | cycle_iterator |
| struct | filter_iterator |
| struct | generate_iterator |
| struct | ints_iterator |
| struct | iota_iterator |
| struct | join_iterator |
| struct | repeat_iterator |
| struct | set_difference_iterator |
| struct | sliding_iterator |
| struct | stride_iterator |
| struct | take_iterator |
| struct | transform_iterator |
| struct | unbounded_iterator |
| struct | zip_iterator |
Functions | |
| template<typename R > | |
| auto | all (R &&range) |
| Create a view on the whole range. More... | |
| auto | all () |
| Create a view on the whole range. More... | |
| template<typename R > | |
| auto | take (R &&range, size_t count) |
| Given a source range and an integral count, return a range consisting of the first count elements from the source range, or the complete range if it has fewer elements. More... | |
| auto | take (size_t count) |
| Given a source range and an integral count, return a range consisting of the first count elements from the source range, or the complete range if it has fewer elements. More... | |
| template<typename I > | |
| auto | counted (I &&it, size_t n, decltype(++it, 0)=0) |
| Given an iterator it and a count n, create a range that starts at it and includes the next n elements. More... | |
| template<typename I > | |
| auto | unbounded (I &&it) |
| Given an iterator, return an infinite range that begins at that position. More... | |
| template<typename T = size_t> | |
| auto | ints (T b=0, T e=std ::numeric_limits< T >::max()) |
| Generate a range of monotonically increasing ints. More... | |
| template<typename T = size_t> | |
| auto | iota (T b, T e, T step=1) |
| Generate a range of sequential integers, increasing by a defined step. More... | |
| template<typename V > | |
| auto | repeat (V &&value) |
| Generate an infinite range of the given value. More... | |
| template<typename R > | |
| auto | join (R &&range_of_ranges) |
| Given a range of ranges, join them into a flattened sequence of elements. More... | |
| auto | join () |
| Given a range of ranges, join them into a flattened sequence of elements. More... | |
| template<typename R > | |
| auto | cycle (R &&range) |
| Returns an infinite range that endlessly repeats the source range. More... | |
| auto | cycle () |
| Returns an infinite range that endlessly repeats the source range. More... | |
| template<typename F > | |
| auto | generate (F &&func) |
| Create an infinite range, repetitively calling func. More... | |
| template<typename F > | |
| auto | generate_n (size_t count, F &&func) |
| template<typename R , typename F > | |
| auto | transform (R &&range, F &&func) |
| Create a view applying a transformation to each element of the input range. More... | |
| template<typename F > | |
| auto | transform (F &&func) |
| Create a view applying a transformation to each element of the input range. More... | |
| template<typename R , typename F > | |
| auto | for_each (R &&range, F &&func) |
| Lazily applies an unary function to each element in the source range that returns another range (possibly empty), flattening the result. More... | |
| template<typename F > | |
| auto | for_each (F &&func) |
| Lazily applies an unary function to each element in the source range that returns another range (possibly empty), flattening the result. More... | |
| template<typename R > | |
| auto | slice (R &&range, intptr_t begin_idx, intptr_t end_idx) |
| Create a view that is a sub-range of a range. More... | |
| auto | slice (intptr_t begin, intptr_t end) |
| Create a view that is a sub-range of a range. More... | |
| template<typename R > | |
| auto | stride (R &&range, size_t step) |
| Create a view consisting of every Nth element, starting with the first. More... | |
| auto | stride (size_t step) |
| Create a view consisting of every Nth element, starting with the first. More... | |
| template<typename R > | |
| auto | retro (R &&range) |
| Create a view that traverses the source range in reverse order. More... | |
| auto | retro () |
| Create a view that traverses the source range in reverse order. More... | |
| template<typename V > | |
| auto | single (V &&value) |
| Given value, create a view containing one element. More... | |
| template<typename ... R> | |
| auto | zip (R &&... _ranges) |
| Given N ranges, return a new range where Mth element is the result of calling std::make_tuple on the Mth elements of all N ranges. More... | |
| template<typename R > | |
| auto | chunk (R &&range, size_t step) |
| Create a view where each element is a range of N elements of the input range. More... | |
| auto | chunk (size_t step) |
| Create a view where each element is a range of N elements of the input range. More... | |
| template<typename R , typename F > | |
| auto | filter (R &&range, F &&func) |
| Create a view with only elements which are filtered. More... | |
| template<typename F > | |
| auto | filter (F &&func) |
| Create a view with only elements which are filtered. More... | |
| template<typename R1 > | |
| auto | concat (R1 &&range1) |
| return the same range More... | |
| template<typename R1 , typename R2 > | |
| auto | concat (R1 &&range1, R2 &&range2) |
| Create a view that is the concatenation of 2 ranges. More... | |
| template<typename R1 , typename R2 , typename ... Ranges> | |
| auto | concat (R1 &&range1, R2 &&range2, Ranges &&... ranges) |
| template<typename R > | |
| auto | enumerate (R &&range) |
| Pair each element of a range with its index. More... | |
| auto | enumerate () |
| Pair each element of a range with its index. More... | |
| template<typename R > | |
| auto | map_value (R &&range) |
| Given a range of std::pair-std::tuple, create a view consisting of just the first element of the pair. More... | |
| auto | map_value () |
| Given a range of std::pair-std::tuple, create a view consisting of just the first element of the pair. More... | |
| template<typename R > | |
| auto | map_key (R &&range) |
| Given a range of std::pair-std::tuple, create a view consisting of just the second element of the pair. More... | |
| auto | map_key () |
| Given a range of std::pair-std::tuple, create a view consisting of just the second element of the pair. More... | |
| template<typename R , typename P = is_lesser, typename = std ::enable_if_t<is_range<R>::value>> | |
| auto | sort (R &&range, P &&pred={}) |
| Make a sorted view of a range. More... | |
| template<typename P = is_lesser, typename = std ::enable_if_t<not is_range<P>::value>> | |
| auto | sort (P &&pred={}) |
| Make a sorted view of a range. More... | |
| template<typename R > | |
| auto | sliding (R &&range, size_t n) |
| Given a range and a count n, place a window over the first n elements of the underlying range. More... | |
| auto | sliding (size_t n) |
| Given a range and a count n, place a window over the first n elements of the underlying range. More... | |
| template<typename R > | |
| auto | drop_exactly (R &&range, size_t count) |
| Given a source range and an integral count, return a range consisting of all but the first count elements from the source range. More... | |
| auto | drop_exactly (size_t count) |
| Given a source range and an integral count, return a range consisting of all but the first count elements from the source range. More... | |
| template<typename R > | |
| auto | drop (R &&range, size_t count) |
| Given a source range and an integral count, return a range consisting of all but the first count elements from the source range, or an empty range if it has fewer elements. More... | |
| auto | drop (size_t count) |
| Given a source range and an integral count, return a range consisting of all but the first count elements from the source range, or an empty range if it has fewer elements. More... | |
| template<typename T = size_t> | |
| auto | closed_ints (T b=0, T e=std ::numeric_limits< T >::max() - 1) |
| Generate a range of monotonically increasing ints. More... | |
| template<typename R1 , typename R2 > | |
| auto | set_difference (R1 &&range1, R2 &&range2) |
| template<typename R2 > | |
| auto | set_difference (R2 &&range2) |
| auto rah::view::all | ( | R && | range | ) |
Create a view on the whole range.
|
inline |
Create a view on the whole range.
| auto rah::view::chunk | ( | R && | range, |
| size_t | step | ||
| ) |
Create a view where each element is a range of N elements of the input range.
|
inline |
Create a view where each element is a range of N elements of the input range.
| rah::view::closed_ints | ( | T | b = 0, |
| T | e = std ::numeric_limits<T>::max() - 1 |
||
| ) |
Generate a range of monotonically increasing ints.
When used without arguments, it generates the quasi-infinite range [0,1,2,3...]. It can also be called with a lower bound, or with a lower and upper bound (inclusive). [lower, uppder]
| auto rah::view::concat | ( | R1 && | range1 | ) |
return the same range
| auto rah::view::concat | ( | R1 && | range1, |
| R2 && | range2 | ||
| ) |
Create a view that is the concatenation of 2 ranges.
| auto rah::view::concat | ( | R1 && | range1, |
| R2 && | range2, | ||
| Ranges &&... | ranges | ||
| ) |
| auto rah::view::counted | ( | I && | it, |
| size_t | n, | ||
| decltype(++it, 0) | = 0 |
||
| ) |
Given an iterator it and a count n, create a range that starts at it and includes the next n elements.
| auto rah::view::cycle | ( | R && | range | ) |
Returns an infinite range that endlessly repeats the source range.
|
inline |
Returns an infinite range that endlessly repeats the source range.
| rah::view::drop | ( | R && | range, |
| size_t | count | ||
| ) |
Given a source range and an integral count, return a range consisting of all but the first count elements from the source range, or an empty range if it has fewer elements.
|
inline |
Given a source range and an integral count, return a range consisting of all but the first count elements from the source range, or an empty range if it has fewer elements.
| rah::view::drop_exactly | ( | R && | range, |
| size_t | count | ||
| ) |
Given a source range and an integral count, return a range consisting of all but the first count elements from the source range.
The source range must have at least that many elements.
|
inline |
Given a source range and an integral count, return a range consisting of all but the first count elements from the source range.
The source range must have at least that many elements.
| auto rah::view::enumerate | ( | R && | range | ) |
Pair each element of a range with its index.
|
inline |
Pair each element of a range with its index.
| auto rah::view::filter | ( | R && | range, |
| F && | func | ||
| ) |
Create a view with only elements which are filtered.
| auto rah::view::filter | ( | F && | func | ) |
Create a view with only elements which are filtered.
| auto rah::view::for_each | ( | R && | range, |
| F && | func | ||
| ) |
Lazily applies an unary function to each element in the source range that returns another range (possibly empty), flattening the result.
|
inline |
Lazily applies an unary function to each element in the source range that returns another range (possibly empty), flattening the result.
| auto rah::view::generate | ( | F && | func | ) |
Create an infinite range, repetitively calling func.
| auto rah::view::generate_n | ( | size_t | count, |
| F && | func | ||
| ) |
| auto rah::view::ints | ( | T | b = 0, |
| T | e = std ::numeric_limits<T>::max() |
||
| ) |
Generate a range of monotonically increasing ints.
When used without arguments, it generates the quasi-infinite range [0,1,2,3...]. It can also be called with a lower bound, or with a lower and upper bound (exclusive). [lower, uppder[
| auto rah::view::iota | ( | T | b, |
| T | e, | ||
| T | step = 1 |
||
| ) |
Generate a range of sequential integers, increasing by a defined step.
| auto rah::view::join | ( | R && | range_of_ranges | ) |
Given a range of ranges, join them into a flattened sequence of elements.
|
inline |
Given a range of ranges, join them into a flattened sequence of elements.
| auto rah::view::map_key | ( | R && | range | ) |
Given a range of std::pair-std::tuple, create a view consisting of just the second element of the pair.
|
inline |
Given a range of std::pair-std::tuple, create a view consisting of just the second element of the pair.
| auto rah::view::map_value | ( | R && | range | ) |
Given a range of std::pair-std::tuple, create a view consisting of just the first element of the pair.
|
inline |
Given a range of std::pair-std::tuple, create a view consisting of just the first element of the pair.
| auto rah::view::repeat | ( | V && | value | ) |
Generate an infinite range of the given value.
| auto rah::view::retro | ( | R && | range | ) |
Create a view that traverses the source range in reverse order.
|
inline |
Create a view that traverses the source range in reverse order.
| auto rah::view::set_difference | ( | R1 && | range1, |
| R2 && | range2 | ||
| ) |
| auto rah::view::set_difference | ( | R2 && | range2 | ) |
| auto rah::view::single | ( | V && | value | ) |
Given value, create a view containing one element.
| auto rah::view::slice | ( | R && | range, |
| intptr_t | begin, | ||
| intptr_t | end | ||
| ) |
|
inline |
Create a view that is a sub-range of a range.
| rah::view::sliding | ( | R && | range, |
| size_t | n | ||
| ) |
Given a range and a count n, place a window over the first n elements of the underlying range.
Return the contents of that window as the first element of the adapted range, then slide the window forward one element at a time until hitting the end of the underlying range.
|
inline |
Given a range and a count n, place a window over the first n elements of the underlying range.
Return the contents of that window as the first element of the adapted range, then slide the window forward one element at a time until hitting the end of the underlying range.
| auto rah::view::sort | ( | R && | range, |
| P && | pred = {} |
||
| ) |
Make a sorted view of a range.
| auto rah::view::sort | ( | P && | pred = {} | ) |
Make a sorted view of a range.
| auto rah::view::stride | ( | R && | range, |
| size_t | step | ||
| ) |
Create a view consisting of every Nth element, starting with the first.
|
inline |
Create a view consisting of every Nth element, starting with the first.
| auto rah::view::take | ( | R && | range, |
| size_t | count | ||
| ) |
Given a source range and an integral count, return a range consisting of the first count elements from the source range, or the complete range if it has fewer elements.
|
inline |
Given a source range and an integral count, return a range consisting of the first count elements from the source range, or the complete range if it has fewer elements.
| auto rah::view::transform | ( | R && | range, |
| F && | func | ||
| ) |
Create a view applying a transformation to each element of the input range.
| auto rah::view::transform | ( | F && | func | ) |
Create a view applying a transformation to each element of the input range.
| auto rah::view::unbounded | ( | I && | it | ) |
Given an iterator, return an infinite range that begins at that position.
| auto rah::view::zip | ( | R &&... | _ranges | ) |
Given N ranges, return a new range where Mth element is the result of calling std::make_tuple on the Mth elements of all N ranges.
The resulting range has the size of the smaller of the sub-ranges
1.8.15