diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-10 17:02:34 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-10 17:02:34 -0300 |
commit | 66e3dec599fc66376f7940e10b5b07276928e453 (patch) | |
tree | 91b8396839ca97f149ff6981af41004b2c933ab5 | |
parent | 6878bab16270855178d1b2b0fb22285894f62827 (diff) | |
download | code-66e3dec599fc66376f7940e10b5b07276928e453.tar.gz code-66e3dec599fc66376f7940e10b5b07276928e453.tar.bz2 code-66e3dec599fc66376f7940e10b5b07276928e453.zip |
Also enforce monotonous C
-rw-r--r-- | log-fourier_integrator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index 1d64d69..12a3516 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -184,6 +184,12 @@ int main(int argc, char* argv[]) { } } + Real Cmax = 0; + for (unsigned i = 0; i < N; i++) { + if (Cₜ₊₁[N-1-i] > Cmax) Cmax = Cₜ₊₁[N-1-i]; + Cₜ₊₁[N-1-i] = Cmax; + } + μₜ *= pow(tanh(C₀-1)+1, x); ΔCₜ = 0; |