@@ -74,6 +74,16 @@ Histogram::Histogram(std::span<const uint32_t> data)
* \return Number of values
*/
+/**
+ * \fn Histogram::empty()
+ * \brief Determine if the histogram is empty
+ *
+ * An empty histogram is one which has only empty bins,
+ * that is, bins with a count of 0.
+ *
+ * \return True if the histogram is empty
+ */
+
/**
* \fn Histogram::operator[](size_t bin) const
* \brief Retrieve the value for \a bin
@@ -41,6 +41,7 @@ public:
uint64_t cumulativeFrequency(double bin) const;
double quantile(double q, uint32_t first = 0, uint32_t last = UINT_MAX) const;
double interQuantileMean(double lowQuantile, double hiQuantile) const;
+ bool empty() const { return total() == 0; }
uint32_t operator[](size_t bin) const
{