Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::AlephSequentialContainer Concept Reference

Concept for Aleph-w mutable sequential containers. More...

#include <ah-concepts.H>

Concept definition

template<typename C>
requires { typename C::Item_Type; } and
requires(C & c, const C & cc, const typename C::Item_Type & val)
{
{ cc.size() } -> std::convertible_to<size_t>;
{ cc.is_empty() } -> std::convertible_to<bool>;
c.append(val);
} and
requires(C & c)
{
c.mutable_for_each([](typename C::Item_Type &) {});
}
Concept for Aleph-w mutable sequential containers.
and
Check uniqueness with explicit hash + equality functors.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.

Detailed Description

Concept for Aleph-w mutable sequential containers.

A type C satisfies AlephSequentialContainer if and only if it exposes all of the following:

Expression Requirement
typename C::Item_Type element type is defined
cc.size() returns something convertible to size_t
cc.is_empty() returns something convertible to bool
c.append(val) accepts const Item_Type &, inserts at back
c.mutable_for_each(f) accepts void(Item_Type &) callable

The four Aleph sequential containers all satisfy this concept:

The concept is primarily used to constrain the fill() and iota() free functions in ahFunctional.H.

Template Parameters
CContainer type to check.
See also
fill() In-place fill with a constant value.
iota() In-place fill with sequential values.

Definition at line 186 of file ah-concepts.H.