MCPcopy Create free account
hub / github.com/RenderKit/oidn / jackknife

Function jackknife

external/catch.hpp:7004–7016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7002
7003 template <typename Estimator, typename Iterator>
7004 sample jackknife(Estimator&& estimator, Iterator first, Iterator last) {
7005 auto n = last - first;
7006 auto second = std::next(first);
7007 sample results;
7008 results.reserve(n);
7009
7010 for (auto it = first; it != last; ++it) {
7011 std::iter_swap(it, first);
7012 results.push_back(estimator(second, last));
7013 }
7014
7015 return results;
7016 }
7017
7018 inline double normal_cdf(double x) {
7019 return std::erfc(-x / std::sqrt(2.0)) / 2.0;

Callers 1

bootstrapFunction · 0.85

Calls 1

nextFunction · 0.85

Tested by

no test coverage detected