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 
16 namespace MEAL
17 {
18 
20  class ComplexCartesian : public Complex
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
Abstract base class implements parameter storage and access.
Definition: Parameters.h:28
void set_real(const Estimate< double > &x)
Set the real part.
Definition: ComplexCartesian.h:39
void set_imag(const Estimate< double > &y)
Set the imaginary part.
Definition: ComplexCartesian.h:47
ComplexCartesian()
Default constructor.
Definition: ComplexCartesian.C:13
std::string get_name() const
Return the name of the class.
Definition: ComplexCartesian.h:61
void set_Estimate(unsigned index, const Estimate< double > &param)
Set the Estimate of the specified parameter.
Definition: Function.C:109
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
void calculate(Return &result, std::vector< Return > *gradient)
Calculate the result and its gradient.
Definition: ComplexCartesian.C:21
Estimate< double > get_real() const
Get the real part.
Definition: ComplexCartesian.h:43
Estimate< double > get_imag() const
Get the imaginary part.
Definition: ComplexCartesian.h:51
void set_name(unsigned index, const std::string &name)
Return the name of the specified parameter.
Definition: Parameters.h:69
Estimate< double > get_Estimate(unsigned index) const
Return an Estimate of the specified parameter.
Definition: Function.C:104

Generated using doxygen 1.8.17