npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
LogRatioTransform1D.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_LOGRATIOTRANSFORM1D_HH_
2 #define NPSTAT_LOGRATIOTRANSFORM1D_HH_
3 
4 /*!
5 // \file LogRatioTransform1D.hh
6 //
7 // \brief Log of the ratio 1-d coordinate transform, as in Johnson's S_B curve
8 //
9 // Author: I. Volobouev
10 //
11 // April 2015
12 */
13 
15 
16 namespace npstat {
18  {
19  public:
20  LogRatioTransform1D(double delta, double lambda, double gamma, double xi);
21  inline virtual ~LogRatioTransform1D() {}
22 
23  inline virtual LogRatioTransform1D* clone() const
24  {return new LogRatioTransform1D(*this);}
25 
26  double transformForward(double x, double* dydx) const;
27  double transformBack(double y) const;
28  inline bool isIncreasing() const {return true;}
29 
30  //@{
31  /** Prototype needed for I/O */
32  inline virtual gs::ClassId classId() const {return gs::ClassId(*this);}
33  virtual bool write(std::ostream&) const;
34  //@}
35 
36  static inline const char* classname()
37  {return "npstat::LogRatioTransform1D";}
38  static inline unsigned version() {return 1;}
39  static LogRatioTransform1D* read(const gs::ClassId& id, std::istream& is);
40 
41  protected:
42  virtual bool isEqual(const AbsDistributionTransform1D&) const;
43 
44  private:
45  inline void setParameterChecked(const unsigned which, const double value)
46  {params_[which] = value;}
47  inline void setAllParametersChecked(const double* p)
48  {for (unsigned i=0; i<4U; ++i) {params_[i] = p[i];}}
49  inline double getParameterChecked(const unsigned which) const
50  {return params_[which];}
51 
52  double params_[4];
53  };
54 }
55 
56 #endif // NPSTAT_LOGRATIOTRANSFORM1D_HH_
Interface definition for 1-d coordinate transformations used to build statistical distributions.
Definition: AbsDistributionTransform1D.hh:29
Definition: LogRatioTransform1D.hh:18
virtual bool isEqual(const AbsDistributionTransform1D &) const
virtual LogRatioTransform1D * clone() const
Definition: LogRatioTransform1D.hh:23
bool isIncreasing() const
Definition: LogRatioTransform1D.hh:28
double transformForward(double x, double *dydx) const
virtual gs::ClassId classId() const
Definition: LogRatioTransform1D.hh:32
Definition: AbsArrayProjector.hh:14