CyclicParameter.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/MEAL/MEAL/CyclicParameter.h
10 
11 #ifndef __CyclicParameter_H
12 #define __CyclicParameter_H
13 
14 #include "MEAL/OneParameter.h"
15 #include "Reference.h"
16 
17 namespace MEAL {
18 
20 
23  class CyclicParameter : public OneParameter {
24 
25  public:
26 
28  CyclicParameter (Function* context = 0);
29 
31  CyclicParameter (const CyclicParameter& np);
32 
34  CyclicParameter (const OneParameter& np);
35 
38 
40  CyclicParameter* clone (Function* context) const;
41 
43  void set_lower_bound (double bound);
44 
46  void set_upper_bound (double bound);
47 
49  void set_period (double period);
50 
52  void set_azimuth (CyclicParameter* azimuth);
53 
54  // ///////////////////////////////////////////////////////////////////
55  //
56  // OneParameter implementation
57  //
58  // ///////////////////////////////////////////////////////////////////
59 
61  void set_param (double value);
62 
64  double get_param () const;
65 
66  protected:
67 
69  void check (double value);
70 
72  void check_elevation ();
73 
74  private:
75 
77  double lower_bound;
78 
80  double upper_bound;
81 
83  double period;
84 
87 
88  };
89 
90 }
91 
92 #endif
Abstract base class implements parameter storage and access.
Definition: OneParameter.h:26
void check_elevation()
Check to see if elevation needs correction.
Definition: CyclicParameter.C:135
virtual void set_param(double value)
Set the value of the parameter.
Definition: OneParameter.C:51
void set_upper_bound(double bound)
Set the upper bound on the parameter value.
Definition: CyclicParameter.C:69
A periodic parameter with bounds.
Definition: CyclicParameter.h:28
void set_lower_bound(double bound)
Set the lower bound on the parameter value.
Definition: CyclicParameter.C:62
CyclicParameter * clone(Function *context) const
Clone operator.
Definition: CyclicParameter.C:39
OneParameter & operator=(const OneParameter &np)
Assignment operator.
Definition: OneParameter.C:33
double get_param() const
Get the value of the parameter.
Definition: CyclicParameter.C:127
CyclicParameter & operator=(const CyclicParameter &np)
Assignment operator.
Definition: CyclicParameter.C:47
virtual double get_param() const
Return the value of the parameter.
Definition: OneParameter.h:72
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
void check(double value)
Ensure that the value is within the bounds.
Definition: CyclicParameter.C:95
CyclicParameter(Function *context=0)
Default constructor.
Definition: CyclicParameter.C:13
void set_period(double period)
Set the period of the parameter value.
Definition: CyclicParameter.C:76
void set_azimuth(CyclicParameter *azimuth)
Set the matching azimuth and behave like an elevation.
Definition: CyclicParameter.C:83
Pure virtual base class of all functions.
Definition: Function.h:49
void set_param(double value)
Set the value of the parameter.
Definition: CyclicParameter.C:90

Generated using doxygen 1.8.17