26#ifndef SCIMATH_HISTACC_H
27#define SCIMATH_HISTACC_H
29#include <casacore/casa/aips.h>
30#include <casacore/casa/Utilities/Fallible.h>
31#include <casacore/scimath/Mathematics/StatAcc.h>
32#include <casacore/casa/Containers/Block.h>
33#include <casacore/casa/iosfwd.h>
34#include <casacore/casa/Arrays/ArrayFwd.h>
115template<
class T>
class HistAcc {
124 HistAcc(
const T low,
const T high,
const T width);
137 inline void put(
const T v);
148 void emptyBinsWithLessThan(
const uInt nmin);
220inline void HistAcc<T>::put(
const T v) {
227#ifndef CASACORE_NO_AUTO_TEMPLATES
228#include <casacore/scimath/Mathematics/HistAcc.tcc>
Mark a value as valid or invalid.
String: the storage and methods of handling collections of characters.
HistAcc(const uInt nBuff)
Makes a histogram from input values.
StatAcc()
A statistics accumulator
this file contains all the compiler specific defines
void defineBins(const T low, const T high, const T width)
Definition of histogram bins with given parameters.
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...
Fallible< T > getBinWidth() const
All bins have the same width.
void reset()
Reset the contents of the bins to zero, but retain the current bin definition.
void copy(double *target, int npixels) const
Fallible< T > getMedian()
void init()
Other internal helper function(s).
Record & operator=(const Record &other)
Copy the data in the other record to this record.
Fallible< 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.
Block< uInt > itsBinContents
Fallible< T > getBinValue(const uInt index) const
bool Bool
Define the standard types used by Casacore.
void put(const T v)
Accumulate (put) value(s) into the histogram.
Fallible< T > getPercentile(const Float p)
Empty all bins whose contents is < nmin (e.g.
const StatAcc< T > & getStatistics()
Get the internal Statistics accumulator (see StatAcc,h).