26#ifndef SCIMATH_HISTACC_H
27#define SCIMATH_HISTACC_H
29#include <casacore/casa/aips.h>
30#include <casacore/scimath/Mathematics/StatAcc.h>
31#include <casacore/casa/Containers/Block.h>
32#include <casacore/casa/iosfwd.h>
33#include <casacore/casa/Arrays/ArrayFwd.h>
123 HistAcc(
const T low,
const T high,
const T width);
136 inline void put(
const T v);
147 void emptyBinsWithLessThan(
const uInt nmin);
215inline void HistAcc<T>::put(
const T v) {
221#ifndef CASACORE_NO_AUTO_TEMPLATES
222#include <casacore/scimath/Mathematics/HistAcc.tcc>
String: the storage and methods of handling collections of characters.
HistAcc(const uInt nBuff)
Makes a histogram from input values.
StatAcc()
A statistics accumulator.
For temporary backward namespace compatibility, use casa as alias for casacore.
void defineBins(const T low, const T high, const T width)
Definition of histogram bins with given parameters.
std::optional< T > getBinWidth() const
All bins have the same width.
void put1(const T)
Accumulate a single value into the histogram.
Block< T > itsBinHighLimit
void putBuffer(const T v)
void printHistogram(ostream &, const String &caption)
Get the nr of `spurious' values, i.e.
void initBuffer(const uInt size)
Internal helper functions for the automatic definition of histogram parameters, using the contents of...
std::optional< uInt > getHistogram(Block< uInt > &bins, Block< T > &values)
The return value is the nr of histogram bins, and is invalid if the number is zero.
void reset()
Reset the contents of the bins to zero, but retain the current bin definition.
std::optional< T > getPercentile(const Float p)
Empty all bins whose contents is < nmin (e.g.
void copy(double *target, int npixels) const
std::optional< T > getMedian()
std::optional< T > getBinValue(const uInt index) const
void init()
Other internal helper function(s).
Block< uInt > itsBinContents
bool Bool
Define the standard types used by Casacore.
void put(const T v)
Accumulate (put) value(s) into the histogram.
const StatAcc< T > & getStatistics()
Get the internal Statistics accumulator (see StatAcc,h).
Block< T > & operator=(const T &val)
Set all values in the block to "val".