Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
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 (Model &model)
 standard constructor
 LeastSq (NoDBBaseConstructor, Model &model)
 alternate constructor
 ~LeastSq ()
 destructor
void initialize_run ()
void run ()
 run portion of run_iterator; 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.

Static Protected Member Functions

static void primary_resp_recast (const Variables &native_vars, const Variables &scaled_vars, const Response &native_response, Response &scaled_response)
 primary response conversion map for RecastModel used in scaling: transform least squares terms (fns, grads, Hessians) from native (user) to iterator space

Protected Attributes

int numLeastSqTerms
 number of least squares terms
LeastSqprevLSqInstance
 pointer containing previous value of leastSqInstance
bool weightFlag
 flag indicating whether weighted least squares is active
String obsDataFilename
 filename from which to read observed data
bool obsDataFlag
 flag indicating whether user-supplied data is active
RealVector obsData
 storage for user-supplied data for computing residuals
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

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 ( 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 Iterator::iteratedModel, LeastSq::leastSqInstance, LeastSq::obsDataFlag, LeastSq::prevLSqInstance, Minimizer::scaleFlag, and Model::update_from_subordinate_model().

void run ( ) [inline, protected, virtual]

run portion of run_iterator; 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 primary_resp_recast ( const Variables native_vars,
const Variables scaled_vars,
const Response native_response,
Response iterator_response 
) [static, protected]
void get_confidence_intervals ( ) [protected]

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