1 // Copyright 2019 Hans Dembinski 2 // 3 // Distributed under the Boost Software License, Version 1.0. 4 // (See accompanying file LICENSE_1_0.txt 5 // or copy at http://www.boost.org/LICENSE_1_0.txt) 6 7 #include <boost/histogram/axis/integer.hpp> 8 #include <boost/histogram/make_profile.hpp> 9 main()10int main() { 11 using namespace boost::histogram; 12 13 struct accumulator { 14 void operator()(double) {} 15 void operator()(weight_type<double>, double) {} 16 }; 17 18 auto h = make_histogram_with(dense_storage<accumulator>(), axis::integer<>(0, 5)); 19 20 // accumulator requires sample 21 h(0, weight(1)); 22 23 auto values = {1, 2}; 24 h.fill(values, weight(1)); 25 } 26