* @brief Allocates `curveCount` front/back rings, each constructed individually: FixedQueue * copies share their backing array, so a copy-fill would alias every curve. */
| 564 | * copies share their backing array, so a copy-fill would alias every curve. |
| 565 | */ |
| 566 | void configure(int curveCount, int capacity, double window) |
| 567 | { |
| 568 | windowSec = window > 0 ? window : 1.0; |
| 569 | const std::size_t curves = static_cast<std::size_t>(curveCount < 0 ? 0 : curveCount); |
| 570 | |
| 571 | front.clear(); |
| 572 | back.clear(); |
| 573 | front.reserve(curves); |
| 574 | back.reserve(curves); |
| 575 | for (std::size_t i = 0; i < curves; ++i) { |
| 576 | front.emplace_back(capacity, windowSec); |
| 577 | back.emplace_back(capacity, windowSec); |
| 578 | } |
| 579 | |
| 580 | resetState(); |
| 581 | } |
| 582 | |
| 583 | /** |
| 584 | * @brief Width of one captured sweep: the timebase override, else the full window. |
no test coverage detected