ReFRACtor
iterative_solver_der.h
Go to the documentation of this file.
1 #ifndef ITERATIVE_SOLVER_DER_H
2 #define ITERATIVE_SOLVER_DER_H
3 #include <iterative_solver.h>
4 #include <cost_func_diff.h>
5 
6 namespace FullPhysics {
7 
8 //-----------------------------------------------------------------------
18 //-----------------------------------------------------------------------
19 
21  public IterativeSolver {
22 
23 public:
24 
25 
26 //-----------------------------------------------------------------------
34 //-----------------------------------------------------------------------
35 
36  IterativeSolverDer(int max_cost_function_calls, bool vrbs)
37  : IterativeSolver(max_cost_function_calls, vrbs)
38  {}
39 
40 
41  virtual ~IterativeSolverDer() {}
42 
43 
44 //-----------------------------------------------------------------------
60 //-----------------------------------------------------------------------
61 
62  virtual std::vector< blitz::Array<double, 1> > gradient_at_accepted_points() const
63  { return Gradient_at_accepted_points; }
64 
65 
66 //-----------------------------------------------------------------------
68 //-----------------------------------------------------------------------
69 
70  virtual void print(std::ostream& Os) const
71  { Os << "IterativeSolverDer"; }
72 
73 
74 protected:
75 
76 //-----------------------------------------------------------------------
89 //-----------------------------------------------------------------------
90 
91  void record_gradient_at_accepted_point(const blitz::Array<double, 1>& gradient)
92  { Gradient_at_accepted_points.push_back(gradient); }
93 
94 
95 private:
96 
97  std::vector< blitz::Array<double, 1> > Gradient_at_accepted_points;
98 
99 };
100 }
101 #endif
The base class for all iterative optimizers that use first order derivatives.
virtual std::vector< blitz::Array< double, 1 > > gradient_at_accepted_points() const
Returns a vector (std) of gradients evaluated at accepted points.
void record_gradient_at_accepted_point(const blitz::Array< double, 1 > &gradient)
For recording the gradient of the cost function evaluated at an accepted point.
IterativeSolverDer(int max_cost_function_calls, bool vrbs)
Constructor.
virtual void print(std::ostream &Os) const
Prints description of object.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
The base class for all iterative optimizers.

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