36 CHECK(a1.
variance() == Approx(std::numeric_limits<T>::max()));
42 CHECK(a1.result() == Approx(2.0));
43 CHECK(a1.result2() == Approx(4.0));
44 CHECK(a1.mean() == Approx(2.0));
45 CHECK(a1.mean2() == Approx(4.0));
46 CHECK(a1.variance() == Approx(0.0));
50 CHECK(a1.result() == Approx(0.0));
51 CHECK(a1.result2() == Approx(0.0));
54 TEST_CASE(
"accumulator basic float",
"[estimators]") { test_real_accumulator_basic<double>(); }
56 TEST_CASE(
"accumulator basic double",
"[estimators]") { test_real_accumulator_basic<double>(); }
85 TEST_CASE(
"accumulator some values float",
"[estimators]") { test_real_accumulator<float>(); }
87 TEST_CASE(
"accumulator some values double",
"[estimators]") { test_real_accumulator<double>(); }
110 TEST_CASE(
"accumulator with weights float",
"[estimators]") { test_real_accumulator_weights<float>(); }
112 TEST_CASE(
"accumulator with weights double",
"[estimators]") { test_real_accumulator_weights<double>(); }
std::pair< return_type, return_type > mean_and_variance() const
helper functions for EinsplineSetBuilder
void test_real_accumulator_basic()
TEST_CASE("complex_helper", "[type_traits]")
return_type mean2() const
return the mean of squared values
void test_real_accumulator_weights()
bool good() const
return true if Weight!= 0
bool bad() const
return true if Weight== 0
generic accumulator of a scalar type
void test_real_accumulator()
REQUIRE(std::filesystem::exists(filename))
return_type mean() const
return the mean
return_type result() const
return the sum
return_type result2() const
return the sum of value squared
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
return_type count() const
return the count
return_type variance() const
ACC::value_type mean(const ACC &ac)
Define and declare accumulator_set.