Done !
| Server IP : 194.181.228.65 / Your IP : 216.73.216.87 Web Server : LiteSpeed System : Linux wn13.webd.pl 5.14.0-687.46.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 11 09:03:19 EDT 2026 x86_64 User : prusit ( 133039) PHP Version : 5.6.40 Disable Function : exec, system, shell_exec, passthru, proc_open, proc_close, popen MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/include/boost/histogram/algorithm/ |
Upload File : |
// Copyright 2019 Henry Schreiner
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_HISTOGRAM_ALGORITHM_EMPTY_HPP
#define BOOST_HISTOGRAM_ALGORITHM_EMPTY_HPP
#include <boost/histogram/fwd.hpp>
#include <boost/histogram/indexed.hpp>
namespace boost {
namespace histogram {
namespace algorithm {
/** Check to see if all histogram cells are empty. Use coverage to include or
exclude the underflow/overflow bins.
This algorithm has O(N) complexity, where N is the number of cells.
Returns true if all cells are empty, and false otherwise.
*/
template <class A, class S>
auto empty(const histogram<A, S>& h, coverage cov) {
using value_type = typename histogram<A, S>::value_type;
const value_type default_value = value_type();
for (auto&& ind : indexed(h, cov)) {
if (*ind != default_value) { return false; }
}
return true;
}
} // namespace algorithm
} // namespace histogram
} // namespace boost
#endif