diff --git a/crates/ekore/src/harmonics/cache.rs b/crates/ekore/src/harmonics/cache.rs index da0f4800b..f8dfd487c 100644 --- a/crates/ekore/src/harmonics/cache.rs +++ b/crates/ekore/src/harmonics/cache.rs @@ -46,6 +46,10 @@ pub enum K { Sm21e, /// $S_{-2,1}(N)$ odd moments Sm21o, + /// recursive harmonics + S1ph, + S2ph, + S3ph, } /// Hold all cached values. @@ -98,6 +102,9 @@ impl Cache { K::Sm3o => w3::Sm3o(self.get(K::S3), self.get(K::S3mh)), K::Sm21e => w3::Sm21e(self.n, self.get(K::S1), self.get(K::Sm1e)), K::Sm21o => w3::Sm21o(self.n, self.get(K::S1), self.get(K::Sm1o)), + K::S1ph => recursive_harmonic_sum(self.get(K::S1mh), (self.n - 1.) / 2., 1, 1), + K::S2ph => recursive_harmonic_sum(self.get(K::S2mh), (self.n - 1.) / 2., 1, 2), + K::S3ph => recursive_harmonic_sum(self.get(K::S3mh), (self.n - 1.) / 2., 1, 3), }; // insert self.m.insert(k, val);