PowerLaw.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2006 by Aidan Hotan
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/MEAL/MEAL/PowerLaw.h
10
11#ifndef __PowerLaw_H
12#define __PowerLaw_H
13
14#include "MEAL/Univariate.h"
15#include "MEAL/Scalar.h"
16#include "MEAL/Parameters.h"
17
18namespace MEAL {
19
21 class PowerLaw : public Univariate<Scalar> {
22
23 public:
24
25 PowerLaw ();
26
28 void set_scale (double scale);
29
31 double get_scale () const;
32
34 void set_offset (double offset);
35
37 double get_offset () const;
38
40 void set_power (double power);
41
43 double get_power () const;
44
45 // ///////////////////////////////////////////////////////////////////
46 //
47 // Function implementation
48 //
49 // ///////////////////////////////////////////////////////////////////
50
52 std::string get_name () const;
53
54 protected:
55
57 void calculate (double& x, std::vector<double>* grad=0);
58
59 private:
60
62 Parameters parameters;
63
64 };
65
66}
67
68#endif
Abstract base class implements parameter storage and access.
Definition Parameters.h:23
std::string get_name() const
Return the name of the class.
Definition PowerLaw.C:20
double get_power() const
Get the power.
Definition PowerLaw.C:57
double get_offset() const
Get the horizontal offset.
Definition PowerLaw.C:45
double get_scale() const
Get the centre.
Definition PowerLaw.C:33
void set_offset(double offset)
Set the horizontal offset.
Definition PowerLaw.C:39
void calculate(double &x, std::vector< double > *grad=0)
Return the value (and gradient, if requested) of the function.
Definition PowerLaw.C:63
void set_scale(double scale)
Set the amplitude scale factor.
Definition PowerLaw.C:27
void set_power(double power)
Set the power.
Definition PowerLaw.C:51
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