23 weight_and_energy.
push({1.0, {2.0}});
26 CHECK(Approx(avg[0]) == 2.0);
29 weight_and_energy.
push({3.0, {1.0}});
32 CHECK(Approx(avg[0]) == 1.25);
36 weight_and_energy.
push(std::move(temp));
39 CHECK(Approx(avg[0]) == 1.444444444);
42 weight_and_energy.
push({0.5, {3.0}});
45 CHECK(Approx(avg[0]) == 1.5);
collect data with a history limit.
helper functions for EinsplineSetBuilder
TEST_CASE("complex_helper", "[type_traits]")
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
auto size() const
return the number of records
void push(const value_type &val)
add a new record
auto weighted_avg() const
return weighted average