Added write-access to the 'state' of the nonlinear optimizers. This is in the advanced interface.

release/4.3a0
Stephen Williams 2012-12-05 20:23:45 +00:00
parent 0898e4a6aa
commit 9ec3c45201
3 changed files with 24 additions and 6 deletions

View File

@ -133,12 +133,18 @@ public:
*/
virtual void iterate();
/** Access the parameters */
/** Read-only access the parameters */
const DoglegParams& params() const { return params_; }
/** Access the last state */
/** Read/write access the parameters. */
DoglegParams& params() { return params_; }
/** Read-only access the last state */
const DoglegState& state() const { return state_; }
/** Read/write access the last state. When modifying the state, the error, etc. must be consistent before calling iterate() */
DoglegState& state() { return state_; }
/** Access the current trust region radius Delta */
double getDelta() const { return state_.Delta; }

View File

@ -88,12 +88,18 @@ public:
*/
virtual void iterate();
/** Access the parameters */
/** Read-only access the parameters */
const GaussNewtonParams& params() const { return params_; }
/** Access the last state */
/** Read/write access the parameters. */
GaussNewtonParams& params() { return params_; }
/** Read-only access the last state */
const GaussNewtonState& state() const { return state_; }
/** Read/write access the last state. When modifying the state, the error, etc. must be consistent before calling iterate() */
GaussNewtonState& state() { return state_; }
/// @}
protected:

View File

@ -150,12 +150,18 @@ public:
*/
virtual void iterate();
/** Access the parameters */
/** Read-only access the parameters */
const LevenbergMarquardtParams& params() const { return params_; }
/** Access the last state */
/** Read/write access the parameters */
LevenbergMarquardtParams& params() { return params_; }
/** Read-only access the last state */
const LevenbergMarquardtState& state() const { return state_; }
/** Read/write access the last state. When modifying the state, the error, etc. must be consistent before calling iterate() */
LevenbergMarquardtState& state() { return state_; }
/// @}
protected: