Go to the documentation of this file. 1 #ifndef NPSTAT_DUALHISTOAXIS_HH_
2 #define NPSTAT_DUALHISTOAXIS_HH_
74 return uniform_ ? static_cast<const NUHistoAxis*>(
nullptr) : &
a_;
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_
DualHistoAxis(const HistoAxis &u)
static unsigned version()
bool operator!=(const DualHistoAxis &r) const
int binNumber(double x) const
Histogram axis with equidistant bins.
unsigned closestValidBin(const double x) const
bool isClose(const DualHistoAxis &r, const double tol) const
double binCenter(const int binNum) const
bool isClose(const HistoAxis &, double tol) const
unsigned overflowIndex(const double x, unsigned *binNumber) const
Interval< double > binInterval(const int binNum) const
double fltBinNumber(const double x, const bool mapLeftEdgeTo0=true) const
bool write(std::ostream &of) const
unsigned overflowIndex(const double x, unsigned *binNum) const
double fltBinNumber(const double x, const bool mapLeftEdgeTo0=true) const
double rightBinEdge(const int binNum) const
double leftBinEdge(const int binNum) const
const HistoAxis * getHistoAxis() const
void setLabel(const char *newlabel)
Interval< double > interval() const
Histogram axis with non-uniform bin spacing.
static DualHistoAxis * read(const gs::ClassId &id, std::istream &in)
DualHistoAxis(const NUHistoAxis &a)
static std::vector< double > dummy_vec()
Interval< double > interval() const
double rightBinEdge(const int binNum) const
static const char * classname()
double binWidth(const int binNum) const
double leftBinEdge(const int binNum) const
int binNumber(const double x) const
const std::string & label() const
const std::string & label() const
unsigned closestValidBin(double x) const
const NUHistoAxis * getNUHistoAxis() const
Interval< double > binInterval(const int binNum) const
const std::string & label() const
bool isClose(const NUHistoAxis &, double tol) const
unsigned closestValidBin(double x) const
DualHistoAxis(unsigned nBins, double min, double max, const char *label=nullptr)
double fltBinNumber(double x, bool mapLeftEdgeTo0=true) const
Interval< double > interval() const
Interval< double > binInterval(const int binNum) const
gs::ClassId classId() const
double leftBinEdge(const int binNum) const
double binWidth(const int binNum) const
double binCenter(const int binNum) const
double binCenter(const int binNum) const
void setLabel(const char *newlabel)
void setLabel(const char *newlabel)
unsigned overflowIndex(const double x, unsigned *binNumber) const
bool operator==(const DualHistoAxis &r) const
DualHistoAxis(const std::vector< double > &binEdges, const char *label=nullptr)
DualHistoAxis rebin(const unsigned newBins) const
double binWidth(const int=0) const
int binNumber(double x) const
double rightBinEdge(const int binNum) const