rangeless::fn
example::my Namespace Reference

Variables

static auto group_all_by
 
static auto unique_all_by
 
static auto where_min_by
 
static auto where_max_by
 
static auto lazy_transform_in_parallel
 
static auto batched_lazy_transform_in_parallel
 

Variable Documentation

◆ batched_lazy_transform_in_parallel

auto example::my::batched_lazy_transform_in_parallel
static
Initial value:
= [](auto fn,
size_t max_queue_size = std::thread::hardware_concurrency(),
size_t batch_size = 2)
{
return [=](auto inputs)
{
return std::move(inputs)
% fn::in_groups_of(batch_size)
% my::lazy_transform_in_parallel( [&](auto inputs_batch)
{
return std::move(inputs_batch)
}, max_queue_size)
% fn::concat();
};
}
impl::group_adjacent_by< impl::chunker > in_groups_of(size_t n)
Group adjacent elements into chunks of specified size.
Definition: fn.hpp:4135
static auto lazy_transform_in_parallel
Definition: aln_filter.cpp:159
impl::concat concat()
Flatten the result of group_all_by or group_adjacent_by.
Definition: fn.hpp:4291
LINQ -like library of higher-order functions for data manipulation.
Definition: fn.hpp:58
impl::to_vector to_vector()
Move elements of an Iterable to std::vector.
Definition: fn.hpp:3459
impl::transform< F > transform(F map_fn)
Create a seq yielding results of applying the transform functions to input-elements.
Definition: fn.hpp:3670

Definition at line 207 of file aln_filter.cpp.

◆ group_all_by

auto example::my::group_all_by
static
Initial value:
= [](auto key_fn)
{
return [key_fn = std::move(key_fn)](auto inputs)
{
return std::move(inputs)
% fn::sort_by(key_fn)
};
}
impl::group_adjacent_by< F > group_adjacent_by(F key_fn)
Group adjacent elements.
Definition: fn.hpp:4059
impl::sort_by< F, impl::stable_sort_tag > sort_by(F key_fn)
stable-sort and return the input.
Definition: fn.hpp:4174

Definition at line 111 of file aln_filter.cpp.

◆ lazy_transform_in_parallel

auto example::my::lazy_transform_in_parallel
static

Definition at line 159 of file aln_filter.cpp.

◆ unique_all_by

auto example::my::unique_all_by
static
Initial value:
= [](auto key_fn)
{
return [key_fn = std::move(key_fn)](auto inputs)
{
return std::move(inputs)
% fn::sort_by(key_fn)
};
}
impl::sort_by< F, impl::stable_sort_tag > sort_by(F key_fn)
stable-sort and return the input.
Definition: fn.hpp:4174
impl::unique_adjacent_by< F > unique_adjacent_by(F key_fn)
Keep first element from every adjacently-equal run of elements.
Definition: fn.hpp:4251

Definition at line 123 of file aln_filter.cpp.

◆ where_max_by

auto example::my::where_max_by
static
Initial value:
= [](auto key_fn)
{
return my::where_min_by( fn::by::decreasing( std::move(key_fn)));
}
impl::gt< T > decreasing(T x)
Wraps the passed value and exposes inverted operator<.
Definition: fn.hpp:898
static auto where_min_by
Definition: aln_filter.cpp:135

Definition at line 152 of file aln_filter.cpp.

◆ where_min_by

auto example::my::where_min_by
static
Initial value:
= [](auto key_fn)
{
return [key_fn = std::move(key_fn)](auto inputs)
{
return std::move(inputs)
% fn::sort_by(key_fn)
% fn::concat();
};
}
impl::group_adjacent_by< F > group_adjacent_by(F key_fn)
Group adjacent elements.
Definition: fn.hpp:4059
impl::concat concat()
Flatten the result of group_all_by or group_adjacent_by.
Definition: fn.hpp:4291
impl::sort_by< F, impl::stable_sort_tag > sort_by(F key_fn)
stable-sort and return the input.
Definition: fn.hpp:4174
impl::take_while< impl::call_count_lt > take_first(size_t n=1)
Yield first n elements.
Definition: fn.hpp:3838

Definition at line 135 of file aln_filter.cpp.