#include <nlls_solver_lm.h>
|
static status_t | test_dx (const Eigen::VectorXd &dx, const Eigen::VectorXd &x, double dx_tol_rel, double dx_tol_abs) |
|
static status_t | test_dx_abs (const Eigen::VectorXd &dx, double dx_tol_abs) |
|
static status_t | test_dx_rel (const Eigen::VectorXd &dx, const Eigen::VectorXd &x, double dx_tol_rel) |
|
static status_t | test_grad_abs (const Eigen::VectorXd &g, double g_tol_abs) |
|
static status_t | test_grad_rel (const Eigen::VectorXd &g, const Eigen::VectorXd &x, double cost, double g_tol_rel) |
|
Definition at line 17 of file nlls_solver_lm.h.
◆ status_t
Enum type for the status of the iterative solver.
Enumerator |
---|
SUCCESS | solve method called and a solution found
|
CONTINUE | solve method called but did not converge to a solution
|
STALLED | solve method was called but stalled
|
ERROR | solve method called but an error was encountered
|
UNTRIED | solve method not called yet
|
Definition at line 50 of file iterative_solver.h.
◆ NLLSSolverLM()
Constructor.
- Parameters
-
[in] | p | The Nonlinear Least Squares problem |
[in] | max_cost_function_calls | read comments on NLLSSolver::NLLSSolver(int32_t,bool) |
[in] | opt | A collection of some of the solver controlling parameters. See the comments on NLLSSolverLM::Options. |
[in] | dx_tol_abs | An absolute tolerance on step size. |
[in] | dx_tol_rel | A relative tolerance on step size. |
[in] | g_tol_abs | An absolute tolerance on gradient size. |
[in] | g_tol_rel | A relative tolerance on gradient size. |
[in] | vrbs | read comments on NLLSSolver::NLLSSolver(int32_t,bool) |
Definition at line 49 of file nlls_solver_lm.cc.
◆ ~NLLSSolverLM()
virtual FullPhysics::NLLSSolverLM::~NLLSSolverLM |
( |
| ) |
|
|
inlinevirtual |
◆ accepted_points()
virtual std::vector< blitz::Array<double, 1> > FullPhysics::IterativeSolver::accepted_points |
( |
| ) |
const |
|
inlinevirtualinherited |
Returns a vector (std) of accepted points.
This method returns a std vector of accepted points in the parameter space. The initial starting point is always an accepted point. Then the second accepted point is the point obtained after taking the first accepted step from the initial (first) point. The third accepted point is the point obtained after taking the second accepted step from the second accepted point and so on.
In other words, if the initial point and all the accepted points after taking the accepted steps are recorded correctly, then
Therefore, if the recording of the accepted points is done correctly, and num_accepted_steps() returns 2, then
- Returns
- A vector of accepted points
Definition at line 133 of file iterative_solver.h.
◆ add_observer()
◆ add_observer_and_keep_reference()
Add an observer and keep a reference to it.
See the discussion in the Observer class description for details.
Definition at line 107 of file observer.h.
◆ add_observer_do() [1/2]
◆ add_observer_do() [2/2]
◆ clean_dead_ptr()
Remove any dead pointers.
Definition at line 196 of file observer.h.
◆ cost_at_accepted_points()
virtual std::vector<double> FullPhysics::IterativeSolver::cost_at_accepted_points |
( |
| ) |
const |
|
inlinevirtualinherited |
Returns a vector (std) of cost function values at accepted points.
This method returns a std vector of cost function values computed at the accepted points. In other words, if the accepted points and the cost function values at these points are recorded correctly, then
- Returns
- A vector of cost function values at accepted points
Definition at line 157 of file iterative_solver.h.
◆ gradient_at_accepted_points()
virtual std::vector< blitz::Array<double, 1> > FullPhysics::IterativeSolverDer::gradient_at_accepted_points |
( |
| ) |
const |
|
inlinevirtualinherited |
Returns a vector (std) of gradients evaluated at accepted points.
This method returns a std vector of gradients computed at the accepted points. In other words, if the accepted points and the computed gradients at these points are recorded correctly, then
Definition at line 62 of file iterative_solver_der.h.
◆ iterate()
◆ notify_update_do()
Function to call to notify Observers of a state change.
The object should pass itself to this function, so it can be passed to the Observers.
Definition at line 121 of file observer.h.
◆ num_accepted_steps()
virtual int FullPhysics::IterativeSolver::num_accepted_steps |
( |
| ) |
const |
|
inlinevirtualinherited |
Returns the number of the accepted steps.
- Returns
- Number of the accepted steps
Definition at line 96 of file iterative_solver.h.
◆ print()
virtual void FullPhysics::NLLSSolverLM::print |
( |
std::ostream & |
Os | ) |
const |
|
inlinevirtual |
◆ print_state()
void NLLSSolverLM::print_state |
( |
std::ostream & |
ostr = std::cout | ) |
|
|
virtual |
Prints solver state.
The method prints some information about the current state of the solver and the problem, for example, the current point and the cost function value and its gradient at the current point.
Definition at line 227 of file nlls_solver_lm.cc.
◆ print_to_string()
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
◆ problem()
◆ record_accepted_point()
void FullPhysics::IterativeSolver::record_accepted_point |
( |
const blitz::Array< double, 1 > & |
point | ) |
|
|
inlineprotectedinherited |
Called to record an accepted point.
This method is called to record an accepted point. It is the responsibility of the implementer of the solve() method to record the accepted points. The accepted points must be recorded in the same order that they are achieved.
- Parameters
-
[in] | point | an accepted point in the parameter space |
Definition at line 246 of file iterative_solver.h.
◆ record_cost_at_accepted_point()
void FullPhysics::IterativeSolver::record_cost_at_accepted_point |
( |
double |
cost | ) |
|
|
inlineprotectedinherited |
Called to record the cost function value at an accepted point.
This method is called to record the cost function value at an accepted point. It is the responsibility of the implementer of the solve() method to record the cost function values at the accepted points. The cost values must be recorded in the same order that they are evaluated.
- Parameters
-
[in] | cost | cost function value at an accepted point in the parameter space |
Definition at line 269 of file iterative_solver.h.
◆ record_gradient_at_accepted_point()
void FullPhysics::IterativeSolverDer::record_gradient_at_accepted_point |
( |
const blitz::Array< double, 1 > & |
gradient | ) |
|
|
inlineprotectedinherited |
For recording the gradient of the cost function evaluated at an accepted point.
This method is called to record the gradient of the cost function evaluated at an accepted point. It is the responsibility of the implementer of the solve() method to record the gradients evaluated at the accepted points. The gradients must be recorded in the same order that they are evaluated.
- Parameters
-
[in] | gradient | gradient of the cost function evaluated at an accepted point in the parameter space |
Definition at line 91 of file iterative_solver_der.h.
◆ remove_observer()
◆ remove_observer_do() [1/2]
◆ remove_observer_do() [2/2]
◆ solve()
void NLLSSolverLM::solve |
( |
| ) |
|
|
virtual |
◆ status()
virtual status_t FullPhysics::IterativeSolver::status |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ status_str()
const char *const IterativeSolver::status_str |
( |
| ) |
const |
|
virtualinherited |
Returns the string version of the solver status.
If the method status() returns
then status_str() will return
- "UNTRIED",
- "SUCCESS",
- "CONTINUE",
- "STALLED", or
- "ERROR"
respectively.
- Returns
- Solver status in string form
Definition at line 14 of file iterative_solver.cc.
◆ test_dx()
NLLSSolver::status_t NLLSSolverLM::test_dx |
( |
const Eigen::VectorXd & |
dx, |
|
|
const Eigen::VectorXd & |
x, |
|
|
double |
dx_tol_rel, |
|
|
double |
dx_tol_abs |
|
) |
| |
|
staticprotected |
◆ test_dx_abs()
◆ test_dx_rel()
NLLSSolver::status_t NLLSSolverLM::test_dx_rel |
( |
const Eigen::VectorXd & |
dx, |
|
|
const Eigen::VectorXd & |
x, |
|
|
double |
dx_tol_rel |
|
) |
| |
|
staticprotected |
◆ test_grad_abs()
◆ test_grad_rel()
NLLSSolver::status_t NLLSSolverLM::test_grad_rel |
( |
const Eigen::VectorXd & |
g, |
|
|
const Eigen::VectorXd & |
x, |
|
|
double |
cost, |
|
|
double |
g_tol_rel |
|
) |
| |
|
staticprotected |
◆ CR_ratio
double FullPhysics::NLLSSolverLM::CR_ratio |
|
protected |
◆ Dx
Eigen::VectorXd FullPhysics::NLLSSolverLM::Dx |
|
protected |
◆ Dx_tol_abs
double FullPhysics::NLLSSolverLM::Dx_tol_abs |
|
protected |
◆ Dx_tol_rel
double FullPhysics::NLLSSolverLM::Dx_tol_rel |
|
protected |
◆ G_tol_abs
double FullPhysics::NLLSSolverLM::G_tol_abs |
|
protected |
◆ G_tol_rel
double FullPhysics::NLLSSolverLM::G_tol_rel |
|
protected |
◆ Lambda
double FullPhysics::NLLSSolverLM::Lambda |
|
protected |
◆ max_cost_f_calls
int FullPhysics::IterativeSolver::max_cost_f_calls |
|
protectedinherited |
◆ olist
◆ Opt
Options FullPhysics::NLLSSolverLM::Opt |
|
protected |
◆ ref_list
◆ stat
status_t FullPhysics::IterativeSolver::stat |
|
protectedinherited |
◆ verbose
bool FullPhysics::IterativeSolver::verbose |
|
protectedinherited |
Eigen::VectorXd FullPhysics::NLLSSolverLM::W |
|
protected |
The documentation for this class was generated from the following files: