ipa: libipa: Add data accessor to Histogram
For debugging purposes it is helpful to access the internal data of the histogram. Add an accessor for that. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
f328b61f66
commit
6d9baefca8
2 changed files with 7 additions and 0 deletions
|
@ -62,6 +62,12 @@ Histogram::Histogram(Span<const uint32_t> data)
|
||||||
* \return Number of bins
|
* \return Number of bins
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \fn Histogram::data()
|
||||||
|
* \brief Retrieve the internal data
|
||||||
|
* \return The data
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn Histogram::total()
|
* \fn Histogram::total()
|
||||||
* \brief Retrieve the total number of values in the data set
|
* \brief Retrieve the total number of values in the data set
|
||||||
|
|
|
@ -36,6 +36,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t bins() const { return cumulative_.size() - 1; }
|
size_t bins() const { return cumulative_.size() - 1; }
|
||||||
|
const Span<const uint64_t> data() const { return cumulative_; }
|
||||||
uint64_t total() const { return cumulative_[cumulative_.size() - 1]; }
|
uint64_t total() const { return cumulative_[cumulative_.size() - 1]; }
|
||||||
uint64_t cumulativeFrequency(double bin) const;
|
uint64_t cumulativeFrequency(double bin) const;
|
||||||
double quantile(double q, uint32_t first = 0, uint32_t last = UINT_MAX) const;
|
double quantile(double q, uint32_t first = 0, uint32_t last = UINT_MAX) const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue