15 #ifndef BORNAGAIN_DEVICE_HISTO_HISTOGRAM1D_H
16 #define BORNAGAIN_DEVICE_HISTO_HISTOGRAM1D_H
35 Histogram1D(
int nbinsx,
const std::vector<double>& xbins);
47 size_t rank()
const {
return 1; }
50 int fill(
double x,
double weight = 1.0);
61 #ifdef BORNAGAIN_PYTHON
Defines interface IHistogram.
One dimensional histogram.
std::vector< double > binValues() const
returns vector of bin content (the value accumulated by bins)
int fill(double x, double weight=1.0)
Increment bin with abscissa x with a weight.
std::vector< double > binCenters() const
returns vector of histogram bin centers
PyObject * binErrorsNumpy() const
PyObject * binValuesNumpy() const
std::vector< double > binErrors() const
returns vector of bin errors
Histogram1D * crop(double xmin, double xmax)
Creates new histogram by applying crop on axis.
size_t rank() const
Returns the number of histogram dimensions.
Histogram1D(int nbinsx, double xlow, double xup)
Constructor for fix bin size histograms.
PyObject * binCentersNumpy() const
Histogram1D * clone() const
Returns clone of other histogram.
Interface for one-dimensional axes.
Base class for 1D and 2D histograms holding values of double type.