@@ -28,6 +28,15 @@ namespace ipa {
* specified bin. It can be used to find quantiles and averages between quantiles.
*/
+/**
+ * \fn Histogram::Histogram()
+ * \brief Construct an empty Histogram
+ *
+ * This empty constructor exists largely to allow Histograms to be embedded in
+ * other classes which may be created before the contents of the Histogram are
+ * known.
+ */
+
/**
* \brief Create a cumulative histogram
* \param[in] data A pre-sorted histogram to be passed
@@ -22,6 +22,7 @@ namespace ipa {
class Histogram
{
public:
+ Histogram() { cumulative_.push_back(0); }
Histogram(Span<const uint32_t> data);
size_t bins() const { return cumulative_.size() - 1; }
uint64_t total() const { return cumulative_[cumulative_.size() - 1]; }