76 std::size_t min_samples = 0) noexcept;
93 [[nodiscard]] std::optional<manifold::SpacetimeEvent>
94 normalize(const manifold::SpacetimeEvent& raw) noexcept;
97 [[nodiscard]] std::
size_t size() const noexcept;
100 [[nodiscard]] std::
size_t window_size() const noexcept;
109 [[nodiscard]]
bool warmed_up() const noexcept;
112 void reset() noexcept;
116 std::
size_t min_samples_;
117 std::
size_t total_{0};
118 std::deque<double> price_buf_;
119 std::deque<double> volume_buf_;
120 std::deque<double> momentum_buf_;
123 static void push(std::deque<double>& buf,
125 std::size_t max_size)
noexcept;
128 static double rolling_mean(
const std::deque<double>& buf)
noexcept;
131 static double rolling_stddev(
const std::deque<double>& buf,
132 double mean)
noexcept;
136 static double zscore(
double value,
137 const std::deque<double>& buf)
noexcept;
139 static constexpr double FLAT_STDDEV_THRESHOLD = 1e-9;
std::size_t total_samples() const noexcept
Total number of samples seen so far (does not saturate at window_size()).
static constexpr std::size_t DEFAULT_MIN_SAMPLES
Minimum number of samples required before warmed_up() returns true.
bool warmed_up() const noexcept
std::size_t size() const noexcept
Number of samples currently in the rolling window (≤ window_size()).
void reset() noexcept
Reset the normalizer, clearing all buffered observations.
std::size_t window_size() const noexcept
Configured maximum window size.
std::optional< manifold::SpacetimeEvent > normalize(const manifold::SpacetimeEvent &raw) noexcept
Spacetime Market Manifold — AGT-02 public API (implemented by AGT-06).