$extrastylesheet
Dakota  Version 6.2
Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions
LeastSq Class Reference

Base class for the nonlinear least squares branch of the iterator hierarchy. More...

Inheritance diagram for LeastSq:
Minimizer Iterator NL2SOLLeastSq NLSSOLLeastSq SNLLLeastSq

List of all members.

Protected Member Functions

 LeastSq ()
 default constructor
 LeastSq (ProblemDescDB &problem_db, Model &model)
 standard constructor
 LeastSq (unsigned short method_name, Model &model)
 alternate "on the fly" constructor
 ~LeastSq ()
 destructor
void initialize_run ()
void core_run ()
 core portion of run; implemented by all derived classes and may include pre/post steps in lieu of separate pre/post
void post_run (std::ostream &s)
void finalize_run ()
 utility function to perform common operations following post_run(); deallocation and resetting of instance pointers
void print_results (std::ostream &s)
virtual void minimize_residuals ()=0
 Used within the least squares branch for minimizing the sum of squares residuals. Redefines the run virtual function for the least squares branch.
void get_confidence_intervals ()
 Calculate confidence intervals on estimated parameters.

Protected Attributes

size_t numLeastSqTerms
 number of least squares terms
LeastSqprevLSqInstance
 pointer containing previous value of leastSqInstance
bool weightFlag
 flag indicating whether weighted least squares is active
RealVector confBoundsLower
 lower bounds for confidence intervals on calibration parameters
RealVector confBoundsUpper
 upper bounds for confidence intervals on calibration parameters

Static Protected Attributes

static LeastSqleastSqInstance
 pointer to LeastSq instance used in static member functions

Private Member Functions

void weight_model ()
 Wrap iteratedModel in a RecastModel that weights the residuals.

Static Private Member Functions

static void primary_resp_weighter (const Variables &unweighted_vars, const Variables &weighted_vars, const Response &unweighted_response, Response &weighted_response)
 Recast callback function to weight least squares residuals, gradients, and Hessians.

Detailed Description

Base class for the nonlinear least squares branch of the iterator hierarchy.

The LeastSq class provides common data and functionality for least squares solvers (including NL2OL, NLSSOLLeastSq, and SNLLLeastSq.


Constructor & Destructor Documentation

LeastSq ( ProblemDescDB problem_db,
Model model 
) [protected]

Member Function Documentation

void initialize_run ( ) [protected, virtual]

This function should be invoked (or reimplemented) by any derived implementations of initialize_run() (which would otherwise hide it).

Reimplemented from Minimizer.

Reimplemented in SNLLLeastSq.

References Minimizer::calibrationDataFlag, Iterator::iteratedModel, LeastSq::leastSqInstance, LeastSq::prevLSqInstance, Minimizer::scaleFlag, and Model::update_from_subordinate_model().

void core_run ( ) [inline, protected, virtual]

core portion of run; implemented by all derived classes and may include pre/post steps in lieu of separate pre/post

Virtual run function for the iterator class hierarchy. All derived classes need to redefine it.

Reimplemented from Iterator.

References LeastSq::minimize_residuals().

void post_run ( std::ostream &  s) [protected, virtual]
void finalize_run ( ) [inline, protected, virtual]

utility function to perform common operations following post_run(); deallocation and resetting of instance pointers

Optional: perform finalization phases of run sequence, like deallocating memory and resetting instance pointers. Commonly used in sub-iterator executions. This is a virtual function; when re-implementing, a derived class must call its nearest parent's finalize_run(), typically _after_ performing its own implementation steps.

Reimplemented from Minimizer.

Reimplemented in SNLLLeastSq.

References LeastSq::leastSqInstance, and LeastSq::prevLSqInstance.

void print_results ( std::ostream &  s) [protected, virtual]
void get_confidence_intervals ( ) [protected]
void weight_model ( ) [private]

Wrap iteratedModel in a RecastModel that weights the residuals.

Setup Recast for weighting model the weighting transformation doesn't resize, so use numUserPrimaryFns. No vars, active set or secondary mapping. All indices are one-to-one mapped (no change in counts).

References Model::assign_rep(), Iterator::iteratedModel, Minimizer::minimizerRecasts, Minimizer::numContinuousVars, LeastSq::numLeastSqTerms, Minimizer::numNonlinearConstraints, Minimizer::numNonlinearIneqConstraints, Iterator::outputLevel, LeastSq::primary_resp_weighter(), Model::primary_response_fn_sense(), Model::primary_response_fn_weights(), Minimizer::secondary_resp_copier(), and Model::subordinate_model().

Referenced by LeastSq::LeastSq().

void primary_resp_weighter ( const Variables unweighted_vars,
const Variables weighted_vars,
const Response unweighted_response,
Response weighted_response 
) [static, private]

The documentation for this class was generated from the following files: