Gaussian.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2004 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/MEAL/MEAL/Gaussian.h
10 
11 #ifndef __Gaussian_H
12 #define __Gaussian_H
13 
14 #include "MEAL/Univariate.h"
15 #include "MEAL/Scalar.h"
16 #include "MEAL/Parameters.h"
17 
18 namespace MEAL {
19 
21  class Gaussian : public Univariate<Scalar> {
22 
23  public:
24 
25  Gaussian ();
26 
28  void set_centre (double centre);
29 
31  double get_centre () const;
32 
34  void set_width (double width);
35 
37  double get_width () const;
38 
40  void set_height (double height);
41 
43  double get_height () const;
44 
46  void set_period (double period);
47 
49  double get_period () const;
50 
51  // ///////////////////////////////////////////////////////////////////
52  //
53  // Function implementation
54  //
55  // ///////////////////////////////////////////////////////////////////
56 
58  std::string get_name () const;
59 
60  protected:
61 
63  void calculate (double& x, std::vector<double>* grad=0);
64 
66  double period;
67 
68  private:
69 
71  Parameters parameters;
72 
73  };
74 
75 }
76 
77 #endif
const ScalarMath exp(const ScalarMath &x)
Return a ScalarMath instance representing exp(x)
Definition: ScalarMath.C:224
double get_centre() const
Get the centre.
Definition: Gaussian.C:35
Abstract base class implements parameter storage and access.
Definition: Parameters.h:28
void calculate(double &x, std::vector< double > *grad=0)
Return the value (and gradient, if requested) of the function.
Definition: Gaussian.C:77
double get_width() const
Get the width.
Definition: Gaussian.C:47
void set_centre(double centre)
Set the centre.
Definition: Gaussian.C:29
double get_period() const
Get the period.
Definition: Gaussian.C:71
double period
Set to greater than zero if the Gaussian is periodic.
Definition: Gaussian.h:76
void set_height(double height)
Set the height.
Definition: Gaussian.C:53
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
std::string get_name() const
Return the name of the class.
Definition: Gaussian.C:22
double get_height() const
Get the height.
Definition: Gaussian.C:59
void set_period(double period)
Set the period.
Definition: Gaussian.C:65
void set_width(double width)
Set the width.
Definition: Gaussian.C:41

Generated using doxygen 1.8.17