ScaledVonMises.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 by Russell Edwards
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/MEAL/MEAL/ScaledVonMises.h
10 
11 #ifndef __ScaledVonMises_H
12 #define __ScaledVonMises_H
13 
14 #include "MEAL/ProductRule.h"
15 #include "MEAL/ScalarParameter.h"
16 #include "MEAL/ScalarArgument.h"
17 #include "MEAL/ScalarMath.h"
18 
19 namespace MEAL {
20 
22  class ScaledVonMises :
23  public Univariate<Scalar> {
24 
25  public:
26 
27  ScaledVonMises (bool log_height = false);
30 
32  ScaledVonMises* clone () const { return new ScaledVonMises(*this); }
33 
35  void set_centre (const Estimate<double> &centre);
36 
38  Estimate<double> get_centre () const;
39 
41  void set_concentration (const Estimate<double> &concentration);
42 
44  Estimate<double> get_concentration () const;
45 
47  void set_width (double width);
48 
50  double get_width () const;
51 
53  void set_height (const Estimate<double> &height);
54 
56  Estimate<double> get_height () const;
57 
59  // void set_argument (unsigned dimension, Argument* axis);
60 
62  double get_area () const;
63 
64  std::string get_name() const;
65 
67  // void parse (const std::string& text);
68 
69  protected:
71  ScalarParameter centre;
72  ScalarParameter concentration;
73 
75  bool log_height;
76 
77  void init ();
78  Reference::To<Scalar> expression;
79  void calculate (double&, std::vector<double>*) {}
80 
81  };
82 
83 }
84 
85 #endif
const ScalarMath exp(const ScalarMath &x)
Return a ScalarMath instance representing exp(x)
Definition: ScalarMath.C:224
Estimate< double > get_concentration() const
Get the concentration.
Definition: ScaledVonMises.C:123
std::string get_name() const
Return the name of the class.
Definition: ScaledVonMises.C:181
double get_area() const
Connect the set_abscissa method to the axis value.
Definition: ScaledVonMises.C:171
Abstract template base class of univariate Function implementations.
Definition: Univariate.h:26
const ScalarMath log(const ScalarMath &x)
Return a ScalarMath instance representing log(x)
Definition: ScalarMath.C:232
ScaledVonMises * clone() const
Clone operator.
Definition: ScaledVonMises.h:42
ScaledVonMises & operator=(const ScaledVonMises &copy)
Assignment operator.
Definition: ScaledVonMises.C:90
Represents a scalar parameter, .
Definition: ScalarParameter.h:24
Estimate< double > get_centre() const
Get the centre.
Definition: ScaledVonMises.C:111
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
void set_height(const Estimate< double > &height)
Set the height.
Definition: ScaledVonMises.C:153
bool log_height
When set, the height attribute is interpreted as log(height) [ensures that height > 0].
Definition: ScaledVonMises.h:85
Estimate< double > get_height() const
Get the height.
Definition: ScaledVonMises.C:162
void calculate(double &, std::vector< double > *)
Calculate the complex value and its gradient.
Definition: ScaledVonMises.h:89
void set_concentration(const Estimate< double > &concentration)
Set the concentration.
Definition: ScaledVonMises.C:117
double get_width() const
Get the width.
Definition: ScaledVonMises.C:145
void set_centre(const Estimate< double > &centre)
Set the centre.
Definition: ScaledVonMises.C:105
const ScalarMath cos(const ScalarMath &x)
Return a ScalarMath instance representing cos(x)
Definition: ScalarMath.C:168
ScalarParameter height
Parses the values of model parameters and fit flags from a string.
Definition: ScaledVonMises.h:80
virtual void copy(const Function *model)
Does the work for operator =.
Definition: Function.C:58
void set_width(double width)
Set the width.
Definition: ScaledVonMises.C:129
ScaledVonMises function.
Definition: ScaledVonMises.h:27

Generated using doxygen 1.8.17