VonMises.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/VonMises.h
10 
11 #ifndef __VonMises_H
12 #define __VonMises_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 {
21 
23  class VonMises : public Univariate<Scalar>
24  {
25  public:
26 
29 
31  VonMises (const VonMises& copy);
32 
35 
37  ~VonMises ();
38 
40  VonMises* clone () const { return new VonMises(*this); }
41 
43  void set_centre (double centre);
44 
46  double get_centre () const;
47 
49  void set_concentration (double concentration);
50 
52  double get_concentration () const;
53 
54  // ///////////////////////////////////////////////////////////////////
55  //
56  // Function implementation
57  //
58  // ///////////////////////////////////////////////////////////////////
59 
61  std::string get_name() const;
62 
64  void parse (const std::string& text);
65 
66  protected:
67 
68  void calculate (double&, std::vector<double>*) {}
69  void init ();
70 
71  Reference::To<Scalar> expression;
72 
73  ScalarParameter centre;
74  ScalarParameter concentration;
75 
76  };
77 
78 }
79 
80 #endif
const ScalarMath exp(const ScalarMath &x)
Return a ScalarMath instance representing exp(x)
Definition: ScalarMath.C:224
VonMises()
Default constructor.
Definition: VonMises.C:40
Abstract template base class of univariate Function implementations.
Definition: Univariate.h:26
Pure virtual base class of function arguments.
Definition: Argument.h:30
Represents a scalar parameter, .
Definition: ScalarParameter.h:24
void set_centre(double centre)
Set the centre.
Definition: VonMises.C:64
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
Von Mises function.
Definition: VonMises.h:28
std::string get_name() const
Get the name of the class.
Definition: VonMises.C:97
double get_concentration() const
Get the concentration.
Definition: VonMises.C:82
VonMises & operator=(const VonMises &copy)
Assignment operator.
Definition: VonMises.C:53
const ScalarMath cos(const ScalarMath &x)
Return a ScalarMath instance representing cos(x)
Definition: ScalarMath.C:168
VonMises * clone() const
Clone operator.
Definition: VonMises.h:50
double get_centre() const
Get the centre.
Definition: VonMises.C:70
void parse(const std::string &text)
Parses the values of model parameters and fit flags from a string.
Definition: VonMises.C:102
virtual void copy(const Function *model)
Does the work for operator =.
Definition: Function.C:58
void set_argument(unsigned dimension, Argument *axis)
Set the independent variable of the specified dimension.
Definition: Function.h:151
void set_concentration(double concentration)
Set the concentration.
Definition: VonMises.C:76
~VonMises()
Destructor.
Definition: VonMises.C:59
void calculate(double &, std::vector< double > *)
Calculate the complex value and its gradient.
Definition: VonMises.h:78

Generated using doxygen 1.8.17