Current hard-coded for `<double>`, but should be templated to allow for more efficient processing of `<int>` values.