Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::Rolling< F, Step, Acc > Struct Template Referenceexport

A window over a periodic predicate, SQL's window function over ROWS BETWEEN CURRENT ROW AND w - 1 FOLLOWING: \(k \mapsto\) the step folded over \(f(k), \ldots, f(k + w - 1)\). A finite combination of translations, so periodic with the same period. More...

Collaboration diagram for dedekind::category::Rolling< F, Step, Acc >:

Public Types

using Domain = Dom<F>
using Codomain = Acc

Public Member Functions

constexpr Acc operator() (Dom< F > k) const

Public Attributes

F f
Dom< F > width {1}

Detailed Description

template<detail_periodic::IsPeriodicPredicate F, std::semiregular Step, std::semiregular Acc>
struct dedekind::category::Rolling< F, Step, Acc >

A window over a periodic predicate, SQL's window function over ROWS BETWEEN CURRENT ROW AND w - 1 FOLLOWING: \(k \mapsto\) the step folded over \(f(k), \ldots, f(k + w - 1)\). A finite combination of translations, so periodic with the same period.

Template Parameters
Fthe predicate.
Stepthe fold.
Accits result.

Member Function Documentation

◆ operator()()

template<detail_periodic::IsPeriodicPredicate F, std::semiregular Step, std::semiregular Acc>
Acc dedekind::category::Rolling< F, Step, Acc >::operator() ( Dom< F > k) const
inlineconstexpr
Parameters
ka count.
Returns
the window's fold at k.

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