ReFRACtor
nlls_problem_scaled.h
Go to the documentation of this file.
1 #ifndef NLLS_PROBLEM_SCALEDH
2 #define NLLS_PROBLEM_SCALEDH
3 #include <nlls_problem.h>
4 #include <boost/shared_ptr.hpp>
5 
6 namespace FullPhysics {
7 /******************************************************************
8  The main function of this class is to scale the parameter
9  space of a NLLS problem to be solved. Currently only a
10  diagonal scaling matrix is supported.
11 *******************************************************************/
13  public NLLSProblem {
14 
15 public:
16 
17 //-----------------------------------------------------------------------
19 //-----------------------------------------------------------------------
20 
21  NLLSProblemScaled( const blitz::Array<double, 1>& s,
23 
24  virtual ~NLLSProblemScaled() {}
25 
26 //-----------------------------------------------------------------------
31 //-----------------------------------------------------------------------
32 
33  virtual blitz::Array<double, 1> residual();
34 
35 //-----------------------------------------------------------------------
40 //-----------------------------------------------------------------------
41 
42  virtual blitz::Array<double, 2> jacobian();
43 
44 
45  virtual int residual_size() const
46  { return P->residual_size(); }
47 
48 
49 //-----------------------------------------------------------------------
51 //-----------------------------------------------------------------------
52 
53  virtual int expected_parameter_size() const
54  { return P->expected_parameter_size(); }
55 
56 
57 //-----------------------------------------------------------------------
68 //-----------------------------------------------------------------------
69 
70  virtual blitz::Array<double, 1> scale_parameters(const blitz::Array<double, 1>& x) const;
71 
72 
73 //-----------------------------------------------------------------------
77 //-----------------------------------------------------------------------
78 
79  virtual blitz::Array<double, 1> unscale_parameters(const blitz::Array<double, 1>& x) const;
80 
81 
82 //-----------------------------------------------------------------------
86 //-----------------------------------------------------------------------
87 
88  virtual void parameters(const blitz::Array<double, 1>& x);
89 
90 
91 //-----------------------------------------------------------------------
98 //-----------------------------------------------------------------------
99 
100  virtual blitz::Array<double, 1> parameters() const
101  { return NLLSProblem::parameters(); }
102 
103 
105  { return P; }
106 
107 
108 //-----------------------------------------------------------------------
110 //-----------------------------------------------------------------------
111 
112  virtual void print(std::ostream& Os) const
113  { Os << "NLLSProblemScaled"; }
114 
115 protected:
116 
117  blitz::Array<double, 1> S;
119 
120 };
121 }
122 #endif
virtual blitz::Array< double, 1 > residual()
Return the residual of the scaled NLLS problem at the current set point.
virtual int expected_parameter_size() const
Return the size of the parameter X.
const Unit s("s", 1.0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0)
virtual void print(std::ostream &Os) const
Print description of object.
NLLSProblemScaled(const blitz::Array< double, 1 > &s, const boost::shared_ptr< NLLSProblem > &p)
Default Constructor.
virtual blitz::Array< double, 2 > jacobian()
Return the Jacobian of the residual of the scaled NLLS problem at the current set point...
virtual blitz::Array< double, 1 > parameters() const
Returns the current parameters.
virtual int residual_size() const
The size of the residual returned by residual()
virtual blitz::Array< double, 1 > parameters() const
Just returns the current values of parameters.
The base class for the Non-Linear Least Squares problem.
Definition: nlls_problem.h:54
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
boost::shared_ptr< NLLSProblem > nlls_problem()
virtual blitz::Array< double, 1 > scale_parameters(const blitz::Array< double, 1 > &x) const
If x is the input to the NLLS problem that this class is trying to scale, then this method scales the...
boost::shared_ptr< NLLSProblem > P
virtual blitz::Array< double, 1 > unscale_parameters(const blitz::Array< double, 1 > &x) const
The input is correctly scaled to be used as input to this scaled NLLS problem.
blitz::Array< double, 1 > S

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:10