proxygen
|
#include <Base-inl.h>
Classes | |
class | Generator |
Public Member Functions | |
GroupByAdjacent () | |
GroupByAdjacent (Selector selector) | |
template<class Source , class Value , class Gen = Generator<Value, Source>> | |
Gen | compose (GenImpl< Value, Source > &&source) const |
template<class Source , class Value , class Gen = Generator<Value, Source>> | |
Gen | compose (const GenImpl< Value, Source > &source) const |
Public Member Functions inherited from folly::gen::Operator< GroupByAdjacent< Selector > > | |
ResultGen | compose (const GenImpl< Value, Source > &source) const |
Public Member Functions inherited from folly::gen::FBounded< Self > | |
const Self & | self () const |
Self & | self () |
Private Attributes | |
Selector | selector_ |
Additional Inherited Members | |
Protected Member Functions inherited from folly::gen::Operator< GroupByAdjacent< Selector > > | |
Operator ()=default | |
Operator (Operator &&) noexcept=default | |
Operator (const Operator &)=default | |
Operator & | operator= (Operator &&) noexcept=default |
Operator & | operator= (const Operator &)=default |
GroupByAdjacent - Group adjacent values by a given key selector, producing a sequence of groups. This differs from GroupBy in that only contiguous sets of values with the same key are considered part of the same group. Unlike GroupBy, this can be used on infinite sequences.
This type is usually used through the 'groupByAdjacent' helper function:
auto tens = seq(0) | groupByAdjacent([](int i){ return (i / 10) % 2; })
This example results in a list like [ 0:[0-9], 1:[10-19], 0:[20-29], ... ]
Definition at line 1221 of file Base-inl.h.
|
inline |
Definition at line 1225 of file Base-inl.h.
|
inlineexplicit |
|
inline |
|
inline |
|
private |
Definition at line 1222 of file Base-inl.h.