/** * @file Decimate.h * @brief Min/max envelope decimation for screen rendering. */ #pragma once #include "Types.h" namespace udpscope { /** * @brief Reduce n points to at most maxPoints by emitting each bucket's * minimum and maximum, in time order. * * LTTB is deliberately not used. It selects representative points and will * silently drop a one-sample glitch; on a scope that glitch is usually the * thing being looked for. The emitted pair stays in time order rather than * value order because callers binary-search the result by time. * * Input shorter than maxPoints is copied through unchanged. */ void MinMaxDecimate(const double* t, const double* v, size_t n, size_t maxPoints, Series& out); } /* namespace udpscope */