ComplexCartesian.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2010 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/MEAL/MEAL/ComplexCartesian.h
10
11#ifndef __MEAL_ComplexCartesian_H
12#define __MEAL_ComplexCartesian_H
13
14#include "MEAL/Complex.h"
15
16namespace MEAL
17{
18
21 {
22
23 public:
24
27
29 void set_real (const Estimate<double>& x)
30 { this->set_Estimate (0, x); }
31
33 Estimate<double> get_real () const
34 { return this->get_Estimate (0); }
35
37 void set_imag (const Estimate<double>& y)
38 { this->set_Estimate (1, y); }
39
41 Estimate<double> get_imag () const
42 { return this->get_Estimate (1); }
43
44 // ///////////////////////////////////////////////////////////////////
45 //
46 // Function implementation
47 //
48 // ///////////////////////////////////////////////////////////////////
49
51 std::string get_name () const
52 { return "ComplexCartesian"; }
53
54 protected:
55
56 typedef std::complex<double> Return;
57
59 void calculate (Return& result, std::vector<Return>* gradient);
60 };
61
62}
63
64#endif
Estimate< double > get_real() const
Get the real part.
Definition ComplexCartesian.h:33
ComplexCartesian()
Default constructor.
Definition ComplexCartesian.C:13
void calculate(Return &result, std::vector< Return > *gradient)
Calculate the result and its gradient.
Definition ComplexCartesian.C:21
void set_real(const Estimate< double > &x)
Set the real part.
Definition ComplexCartesian.h:29
Estimate< double > get_imag() const
Get the imaginary part.
Definition ComplexCartesian.h:41
void set_imag(const Estimate< double > &y)
Set the imaginary part.
Definition ComplexCartesian.h:37
std::string get_name() const
Return the name of the class.
Definition ComplexCartesian.h:51
Pure virtual base class of all complex-valued functions.
Definition Complex.h:39
void set_Estimate(unsigned index, const Estimate< double > &param)
Set the Estimate of the specified parameter.
Definition Function.C:109
Estimate< double > get_Estimate(unsigned index) const
Return an Estimate of the specified parameter.
Definition Function.C:104
Namespace in which all modeling and calibration related code is declared.
Definition ExampleComplex2.h:16

Generated using doxygen 1.14.0