From 470492c748e1ea90dcb96de369bead0acb9f9281 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Tue, 28 Nov 2017 15:55:18 +0100 Subject: [PATCH] adding value_iterator for histogram, make weight_counter public, allow passing weight_counter as argument to array_storage --- .../boost/histogram/arithmetic_operators.hpp | 34 ++--- include/boost/histogram/axis/any.hpp | 105 +++++++------ include/boost/histogram/axis/axis.hpp | 1 + include/boost/histogram/axis/iterator.hpp | 16 +- .../boost/histogram/detail/axis_visitor.hpp | 3 +- include/boost/histogram/detail/meta.hpp | 29 ++-- include/boost/histogram/detail/utility.hpp | 10 +- .../boost/histogram/detail/weight_counter.hpp | 87 ----------- include/boost/histogram/dynamic_histogram.hpp | 139 +++++++++++------- include/boost/histogram/histogram.hpp | 2 +- include/boost/histogram/histogram_fwd.hpp | 28 ++-- include/boost/histogram/ostream_operators.hpp | 3 +- include/boost/histogram/serialization.hpp | 23 ++- include/boost/histogram/static_histogram.hpp | 48 +++--- .../histogram/storage/adaptive_storage.hpp | 44 +++--- .../boost/histogram/storage/array_storage.hpp | 41 +++++- include/boost/histogram/storage/operators.hpp | 74 +++++----- .../histogram/storage/weight_counter.hpp | 120 +++++++++++++++ include/boost/histogram/value_iterator.hpp | 82 +++++++++++ test/adaptive_storage_test.cpp | 52 +++---- test/array_storage_test.cpp | 34 +++-- test/axis_test.cpp | 4 +- test/detail_test.cpp | 33 ----- test/histogram_test.cpp | 132 ++++++++++++----- test/meta_test.cpp | 3 +- test/weight_counter_test.cpp | 52 +++++++ 26 files changed, 734 insertions(+), 465 deletions(-) delete mode 100644 include/boost/histogram/detail/weight_counter.hpp create mode 100644 include/boost/histogram/storage/weight_counter.hpp create mode 100644 include/boost/histogram/value_iterator.hpp create mode 100644 test/weight_counter_test.cpp diff --git a/include/boost/histogram/arithmetic_operators.hpp b/include/boost/histogram/arithmetic_operators.hpp index 7372cce7..023f0483 100644 --- a/include/boost/histogram/arithmetic_operators.hpp +++ b/include/boost/histogram/arithmetic_operators.hpp @@ -13,78 +13,64 @@ namespace boost { namespace histogram { template