1 #ifndef NPSTAT_LOGMAPPER1D_HH_
2 #define NPSTAT_LOGMAPPER1D_HH_
32 const double x1,
const double y1)
34 if (!(x0 > 0.0 && x1 > 0.0))
throw std::invalid_argument(
35 "In npstat::LogMapper1d constructor: "
36 "both abscissae must be positive");
37 const double lnx1 = log(x1);
38 const double lnx0 = log(x0);
39 const double dx = lnx1 - lnx0;
40 if (!dx)
throw std::invalid_argument(
41 "In npstat::LogMapper1d constructor: "
42 "invalid arguments (log(x0) == log(x1))");
44 b_ = ((y0 + y1) - a_*(lnx0 + lnx1))/2.0;
48 inline LogMapper1d(
const double ca,
const double cb) : a_(ca), b_(cb) {}
53 if (!(x > 0.0))
throw std::invalid_argument(
54 "In npstat::LogMapper1d::operator(): argument must be positive");
59 inline double a()
const {
return a_;}
62 inline double b()
const {
return b_;}
Definition: LogMapper1d.hh:20
LogMapper1d(const double x0, const double y0, const double x1, const double y1)
Definition: LogMapper1d.hh:31
double a() const
Definition: LogMapper1d.hh:59
LogMapper1d()
Definition: LogMapper1d.hh:23
double b() const
Definition: LogMapper1d.hh:62
LogMapper1d(const double ca, const double cb)
Definition: LogMapper1d.hh:48
double operator()(const double &x) const
Definition: LogMapper1d.hh:51
Definition: AbsArrayProjector.hh:14