File indexing completed on 2025-01-18 09:38:09
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_HISTOGRAM_ALGORITHM_EMPTY_HPP
0008 #define BOOST_HISTOGRAM_ALGORITHM_EMPTY_HPP
0009
0010 #include <boost/histogram/fwd.hpp>
0011 #include <boost/histogram/indexed.hpp>
0012
0013 namespace boost {
0014 namespace histogram {
0015 namespace algorithm {
0016
0017
0018
0019
0020
0021
0022
0023 template <class A, class S>
0024 auto empty(const histogram<A, S>& h, coverage cov) {
0025 using value_type = typename histogram<A, S>::value_type;
0026 const value_type default_value = value_type();
0027 for (auto&& ind : indexed(h, cov)) {
0028 if (*ind != default_value) { return false; }
0029 }
0030 return true;
0031 }
0032 }
0033 }
0034 }
0035
0036 #endif