1 #ifndef NPSTAT_DUALHISTOAXIS_HH_ 2 #define NPSTAT_DUALHISTOAXIS_HH_ 93 inline double fltBinNumber(
const double x,
const bool mapLeftEdgeTo0 =
true)
const {
118 inline gs::ClassId
classId()
const {
return gs::ClassId(*
this); }
119 bool write(std::ostream&
of)
const;
122 static inline const char*
classname() {
return "npstat::DualHistoAxis"; }
123 static inline unsigned version() {
return 1; }
131 template <
typename Numeric,
class Axis>
139 std::vector<double> vec(2, 0.0);
148 #endif // NPSTAT_DUALHISTOAXIS_HH_
unsigned overflowIndex(const double x, unsigned *binNumber) const
Interval< double > binInterval(const int binNum) const
unsigned overflowIndex(const double x, unsigned *binNum) const
unsigned closestValidBin(double x) const
void setLabel(const char *newlabel)
const std::string & label() const
Interval< double > interval() const
double binCenter(const int binNum) const
double fltBinNumber(double x, bool mapLeftEdgeTo0=true) const
int binNumber(const double x) const
unsigned closestValidBin(double x) const
double rightBinEdge(const int binNum) const
Histogram axis with non-uniform bin spacing.
const NUHistoAxis * getNUHistoAxis() const
bool operator==(const DualHistoAxis &r) const
Interval< double > binInterval(const int binNum) const
double binCenter(const int binNum) const
double leftBinEdge(const int binNum) const
double rightBinEdge(const int binNum) const
void setLabel(const char *newlabel)
static const char * classname()
unsigned closestValidBin(const double x) const
DualHistoAxis(unsigned nBins, double min, double max, const char *label=nullptr)
double leftBinEdge(const int binNum) const
double binWidth(const int binNum) const
bool isClose(const DualHistoAxis &r, const double tol) const
double rightBinEdge(const int binNum) const
Interval< double > interval() const
DualHistoAxis(const HistoAxis &u)
static DualHistoAxis * read(const gs::ClassId &id, std::istream &in)
unsigned overflowIndex(const double x, unsigned *binNumber) const
double fltBinNumber(const double x, const bool mapLeftEdgeTo0=true) const
DualHistoAxis(const std::vector< double > &binEdges, const char *label=nullptr)
bool operator!=(const DualHistoAxis &r) const
DualHistoAxis rebin(const unsigned newBins) const
bool write(std::ostream &of) const
const HistoAxis * getHistoAxis() const
int binNumber(double x) const
void setLabel(const char *newlabel)
double binCenter(const int binNum) const
Interval< double > binInterval(const int binNum) const
double binWidth(const int=0) const
static unsigned version()
const std::string & label() const
Interval< double > interval() const
const std::string & label() const
double binWidth(const int binNum) const
double leftBinEdge(const int binNum) const
bool isClose(const HistoAxis &, double tol) const
Histogram axis with equidistant bins.
static std::vector< double > dummy_vec()
gs::ClassId classId() const
bool isClose(const NUHistoAxis &, double tol) const
double fltBinNumber(const double x, const bool mapLeftEdgeTo0=true) const
DualHistoAxis(const NUHistoAxis &a)
int binNumber(double x) const