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
18namespace 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
void calculate(double &x, std::vector< double > *grad=0)
Return the value (and gradient, if requested) of the function.
Definition Gaussian.C:77
void set_period(double period)
Set the period.
Definition Gaussian.C:65
void set_width(double width)
Set the width.
Definition Gaussian.C:41
double get_centre() const
Get the centre.
Definition Gaussian.C:35
void set_centre(double centre)
Set the centre.
Definition Gaussian.C:29
double get_width() const
Get the width.
Definition Gaussian.C:47
double get_height() const
Get the height.
Definition Gaussian.C:59
void set_height(double height)
Set the height.
Definition Gaussian.C:53
double period
Set to greater than zero if the Gaussian is periodic.
Definition Gaussian.h:66
std::string get_name() const
Return the name of the class.
Definition Gaussian.C:22
double get_period() const
Get the period.
Definition Gaussian.C:71
Abstract base class implements parameter storage and access.
Definition Parameters.h:23
Univariate()
Definition Univariate.h:28
Namespace in which all modeling and calibration related code is declared.
Definition ExampleComplex2.h:16

Generated using doxygen 1.14.0