1 #ifndef CONNOR_SOLVER_MAP_H 2 #define CONNOR_SOLVER_MAP_H 9 #include <blitz/array.h> 10 #include <boost/shared_ptr.hpp> 61 int max_cost_function_calls,
63 double Gamma_initial = 0.0,
64 const std::string& Fname_test_data =
"")
65 :
NLLSSolver(NLLS_MAP, max_cost_function_calls, vrbs),
67 map(NLLS_MAP->max_a_posteriori())
123 void print(std::ostream& Os)
const { Os <<
"ConnorSolverMAP";}
165 blitz::Array<double, 1>
dx;
boost::shared_ptr< ConvergenceCheck > convergence_check_
The convergence check object.
double gamma_last_step() const
Levenberg-Marquardt parameter for last step we processed.
virtual FitStatistic fit_statistic() const
Return fit results for solution to last problem solved.
This class holds various parameters describing how good of a fit we have.
double gamma_last_step_
Stash gamma from last step we processed.
virtual ~ConnorSolverMAP()
int outcome_flag() const
Outcome flag. This is an integer version of FitStatistic::OUTCOME.
double gamma_initial
Initial value of gamma.
The base class for the solvers of the Nonlinear-Least-Squares Problem.
void do_inversion()
This does an inversion step.
std::string fname_test_data
If this isn't an empty string, save to this file in the first iteration.
double gamma
Levenberg-Marquardt parameter.
boost::shared_ptr< NLLSProblemScaled > scaled_p
void solve()
This solves the least squares problem starting at the initial guess.
int number_divergent
Number of divergent steps.
blitz::Array< double, 1 > x_update() const
Return the a priori of the last problem solved.
static double rcond
Factor to determine if we treat a singular factor as 0.
int number_divergent() const
Number of divergent steps for the last problem solved.
blitz::Array< double, 1 > dx
This is the update to , .
OUTCOME outcome
Flag indicating success of fit, or why fit wasn't succesful.
This solves a nonlinear least squares problem using Levenberg-Marquardt.
boost::shared_ptr< ConvergenceCheck > convergence_check() const
The convergence check object.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
void print(std::ostream &Os) const
Prints description of object.
FitStatistic fstat
Results from last fit step.
int number_iteration
Number of iterations.
int number_iteration() const
Number of iterations for the last problem solved.
const boost::shared_ptr< MaxAPosteriori > map
ConnorSolverMAP(const boost::shared_ptr< NLLSMaxAPosteriori > &NLLS_MAP, const boost::shared_ptr< ConvergenceCheck > &Convergence_check, int max_cost_function_calls, bool vrbs=false, double Gamma_initial=0.0, const std::string &Fname_test_data="")
and optionally an initial value for gamma.