24[[nodiscard]] MAYAFLUX_API
double horner(std::span<const double> coefficients,
double x)
noexcept;
33 std::span<const double>
window, std::span<const double> coefs)
noexcept;
44 std::span<const double>
window, std::span<const double> coefs)
noexcept;
54 std::span<const double>
window, std::span<const double> coefs)
noexcept;
63 std::span<const double>
window, std::span<const double> coefs)
noexcept;
73 std::span<const double>
window, std::span<const double> coefs)
noexcept;
82 std::span<const double>
window, std::span<const double> coefs)
noexcept;
89 return 2.0 * std::numbers::pi *
frequency / sample_rate;
106 std::span<const double> increments,
107 std::span<const double> scales = {},
108 std::span<const double> am_increments = {},
109 std::span<const double> phases = {},
110 std::span<const double> am_phases = {});
122 std::span<const double>
window, std::span<double> coefs)
noexcept;
140 std::span<const double>
window, std::span<const double> coefs)
noexcept;
151 std::span<const double>
window, std::span<const double> coefs)
noexcept;
161 std::span<const double>
window, std::span<const double> coefs)
noexcept;
174 std::span<const double>
window, std::span<const double> coefs)
noexcept;
186[[nodiscard]] MAYAFLUX_API
double dilate(
187 std::span<const double>
window, std::span<const double> coefs)
noexcept;
192[[nodiscard]] MAYAFLUX_API
double erode(
193 std::span<const double>
window, std::span<const double> coefs)
noexcept;
205[[nodiscard]] MAYAFLUX_API
double quantile(
206 std::span<const double>
window, std::span<const double> coefs);
219[[nodiscard]] MAYAFLUX_API
double zscore(
220 std::span<const double>
window, std::span<const double> coefs)
noexcept;
231[[nodiscard]] MAYAFLUX_API
double goertzel(
232 std::span<const double>
window, std::span<const double> coefs)
noexcept;
243 std::span<const double>
window, std::span<const double> coefs)
noexcept;
259 std::span<const double> increments,
260 std::span<const double> scales = {},
261 std::span<const double> phases = {});
273 std::span<const double>
window, std::span<double> coefs)
noexcept;
285 std::span<const double> omegas,
double coupling, std::span<const double> phases = {});
297[[nodiscard]] MAYAFLUX_API
double kuramoto(
298 std::span<const double>
window, std::span<double> coefs)
noexcept;
310 std::span<const double> cells,
double r,
double epsilon);
321 std::span<const double>
window, std::span<double> coefs)
noexcept;
329[[nodiscard]] MAYAFLUX_API std::vector<double>
lorenz_state(
333 double beta = 8.0 / 3.0,
346 std::span<const double>
window, std::span<double> coefs)
noexcept;
367 std::span<const double>
window, std::span<double> coefs)
noexcept;
std::weak_ptr< Core::Window > window
std::vector< std::byte > values
std::vector< double > rotor_bank_state(std::span< const double > increments, std::span< const double > scales, std::span< const double > phases)
Builds the array rotor_bank reads and writes.
double horner(std::span< const double > coefficients, double x) noexcept
Horner evaluation, coefficients highest power first.
double modular_recurrence(std::span< const double > window, std::span< const double > coefs) noexcept
Weighted sum wrapped into [0, modulus).
double phasor_bank(std::span< const double >, std::span< double > coefs) noexcept
Sum of N sinusoidal partials, each with its own slow amplitude swell.
double table_lookup(std::span< const double > window, std::span< const double > coefs) noexcept
Transfer table indexed by the current value.
double rotor_bank(std::span< const double >, std::span< double > coefs) noexcept
Sum of N sinusoids advanced by complex rotation instead of a sine call.
double polynomial_lags(std::span< const double > window, std::span< const double > coefs) noexcept
Polynomial in several lags at once.
double weighted_sum(std::span< const double > window, std::span< const double > coefs) noexcept
Sum of window[k] * coefs[k] over the shorter of the two.
double kuramoto(std::span< const double >, std::span< double > coefs) noexcept
Kuramoto oscillators pulled toward their mean phase.
std::vector< double > kuramoto_state(std::span< const double > omegas, double coupling, std::span< const double > phases)
Builds the array kuramoto reads and writes.
double iterated_polynomial(std::span< const double > window, std::span< const double > coefs) noexcept
Polynomial of the previous value, coefs highest power first.
double goertzel(std::span< const double > window, std::span< const double > coefs) noexcept
Weighted energy of the window at chosen frequencies.
double pattern_lookup(std::span< const double > window, std::span< const double > coefs) noexcept
Table indexed by the recent shape of the window.
double erode(std::span< const double > window, std::span< const double > coefs) noexcept
Minimum over the window of window[k] - coefs[k], the grayscale erosion.
double dilate(std::span< const double > window, std::span< const double > coefs) noexcept
Maximum over the window of window[k] + coefs[k], the grayscale dilation.
double quantile(std::span< const double > window, std::span< const double > coefs)
Quantile of the whole window, interpolating between ranks.
double table_lookup_previous(std::span< const double > window, std::span< const double > coefs) noexcept
table_lookup indexed by window[1] instead of window[0].
std::vector< double > coupled_map_lattice_state(std::span< const double > cells, double r, double epsilon)
Builds the array coupled_map_lattice reads and writes.
std::vector< double > phasor_bank_state(std::span< const double > increments, std::span< const double > scales, std::span< const double > am_increments, std::span< const double > phases, std::span< const double > am_phases)
Builds the array phasor_bank reads and writes.
std::vector< double > step_sequence_state(std::span< const double > values, double threshold)
Builds the array step_sequence reads and writes.
double lorenz_attractor(std::span< const double >, std::span< double > coefs) noexcept
Lorenz system stepped once by fourth order Runge-Kutta, returning x.
double step_sequence(std::span< const double > window, std::span< double > coefs) noexcept
Table of values advanced by a trigger.
double breakpoint_curve(std::span< const double > window, std::span< const double > coefs) noexcept
Piecewise linear curve through (x, y) points.
double tapped_sum(std::span< const double > window, std::span< const double > coefs) noexcept
Sum of gain * window[lag] over (lag, gain) pairs.
double radians_per_sample(double frequency, double sample_rate) noexcept
Radians per sample for a frequency, for building phasor_bank state.
std::vector< double > lorenz_state(double dt, double sigma, double rho, double beta, double x, double y, double z)
Builds the array lorenz_attractor reads and writes.
double coupled_map_lattice(std::span< const double >, std::span< double > coefs) noexcept
Ring of logistic maps with nearest neighbour coupling.
double fourier_series(std::span< const double > window, std::span< const double > coefs) noexcept
Fourier series of a phase.
double chebyshev_series(std::span< const double > window, std::span< const double > coefs) noexcept
Sum of coefs[k] * T_k(window[0]) over Chebyshev polynomials.
double zscore(std::span< const double > window, std::span< const double > coefs) noexcept
How far the newest value sits from the rest of the window, in standard deviations.