Bug #515

Linear array of parameter pointer is not updated in operator access.

Added by Knödlseder Jürgen over 11 years ago. Updated over 11 years ago.

Status:ClosedStart date:09/20/2012
Priority:UrgentDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:00-07-00
Duration:

Description

GModels that derives from GOptimizerPars carries a linear array of pointers that allows an easy access to all model parameters. This array is actually setup in the GModels::append() and GModels::copy() methods.

However, models may also be modified using the access operator, as the access operator returns a reference to a model. If models are modified that way, the linear array of pointers is not updated.

Some mechanisms has to be implemented to flag if the linear array of pointers needs to be updated, and an update has to be launched if the flag is set before any further model access.

This is furthermore complicated by the fact that model parameter may be accessed through the GOptimizerPars base class function, which for the moment does not know anything about the update method.

A possible solution would be to add an update flag at the level of the GOptimizerPars class and to define a pure virtual set_pointers() function (or equivalent). GOptimizerPars access methods call then always set_pointers() in case that the flag has been set. GModels access methods do the same things.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 11 years ago

  • Assigned To set to Knödlseder Jürgen

#2 Updated by Knödlseder Jürgen over 11 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

This is now solved as all methods that set models call the set_pointers() method.

Also available in: Atom PDF