Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::sequences::IotaIntersection Struct Referenceexport

std::ranges::iota_view as a Form-chain object: an order::IsOrderMeetSemilattice under subset-inclusion, with intersection as the meet. More...

Public Member Functions

template<std::integral T>
constexpr std::ranges::iota_view< T, T > operator() (const std::ranges::iota_view< T, T > &a, const std::ranges::iota_view< T, T > &b) const

Detailed Description

std::ranges::iota_view as a Form-chain object: an order::IsOrderMeetSemilattice under subset-inclusion, with intersection as the meet.

(#703 Slice 3b)

Two iota_view values a, b can be intersected: their meet is the iota_view [max(start), min(bound)) clamped to empty if disjoint. Intersection is associative, commutative, and idempotent — the three trait registrations below make IsOrderMeetSemilattice<iota_view<T,T>, IotaIntersection> fire.

Note
Why meet-only and not a full lattice: union of two iota_views is not in general an iota_view ([0,3) ∪ [5,10) is not one interval), so iota_view's carrier is not closed under join. The full lattice lives on the richer carrier, finite unions of intervals: the run lists of order:runs.

The meet (intersection) operator on std::ranges::iota_view values: a callable that returns the iota_view of the common tail, or an empty iota_view on disjoint inputs.


The documentation for this struct was generated from the following file: