11 const auto is_finite = [](
Breakpoint b) {
return isfinite(b.t); };
12 const auto infinite =
partition(breakpoints, is_finite);
13 const auto finite = breakpoints.first(breakpoints.size() - infinite.size());
15 const auto le_zero = [](
Breakpoint b) {
return b.t <= 0; };
16 const auto positive =
partition(finite, le_zero);
17 const auto first_pos = finite.size() - positive.size();
20 .neg_bp = finite.first(first_pos),
21 .pos_bp = finite.subspan(first_pos),
28 auto &neg_bp = breakpoints.
neg_bp, &pos_bp = breakpoints.
pos_bp;
31 [](
Breakpoint p) { return p.δ > 0 ? p.δ * p.δ : 0; });
33 [](
Breakpoint p) { return p.δ < 0 ? p.δ * p.δ : 0; });
34 auto a = a_plus + a_minus + η;
36 [](
Breakpoint p) { return p.δ > 0 ? p.δ * p.α() : 0; });
38 [](
Breakpoint p) { return p.δ < 0 ? p.δ * p.α() : 0; });
39 auto b = b_plus + b_minus - β;
40 return {.a = a, .b = b};