Lines Matching refs:acc2
115 accumulator_set<sample_t, stats<tag::mean(immediate)> > acc2(sample = sample_t(3,0)); in test_stat() local
117 acc2(sample_t(3,1)); in test_stat()
118 is_equal(std::vector<double>(3,1.), mean(acc2)); in test_stat()
119 BOOST_CHECK_EQUAL(1u, count(acc2)); in test_stat()
121 acc2(sample_t(3,0)); in test_stat()
122 is_equal(std::vector<double>(3,0.5), mean(acc2)); in test_stat()
123 BOOST_CHECK_EQUAL(2u, count(acc2)); in test_stat()
125 acc2(sample_t(3,2)); in test_stat()
126 is_equal(std::vector<double>(3,1.), mean(acc2)); in test_stat()
127 BOOST_CHECK_EQUAL(3u, count(acc2)); in test_stat()
150 … accumulator_set<sample_t, stats<tag::weighted_mean(immediate)>, int> acc2(sample = sample_t(3,0)); in test_stat() local
152 acc2(sample_t(3,10), weight = 2); // 20 in test_stat()
153 BOOST_CHECK_EQUAL(2, sum_of_weights(acc2)); // in test_stat()
155 acc2(sample_t(3,6), weight = 3); // 18 in test_stat()
156 BOOST_CHECK_EQUAL(5, sum_of_weights(acc2)); // in test_stat()
158 acc2(sample_t(3,4), weight = 4); // 16 in test_stat()
159 BOOST_CHECK_EQUAL(9, sum_of_weights(acc2)); // in test_stat()
161 acc2(sample_t(3,6), weight = 5); //+ 30 in test_stat()
162 BOOST_CHECK_EQUAL(14, sum_of_weights(acc2));// in test_stat()
165 is_equal(std::vector<double>(3,6.), weighted_mean(acc2)); in test_stat()