gtopt::line_losses::DynamicAssignment struct

Result of compute_dynamic_loss_layout per line.

Encodes the two outputs of the dynamic rule:

  • K segment count assigned by the cube-root rule (Phase 1 — identical to compute_adaptive_loss_segments)
  • layout PWL layout chosen by the mean-error allocator (Phase 2 — uniform for most lines, midpoint for the heaviest mean-error contributors).

K = 0 and layout = LinePwlLayout::uniform signals a lossless line (R ≤ 0 or fmax ≤ 0); the caller's PWL builder should omit it.

Public variables

int K
LinePwlLayout layout