-
…ients argument (#1847) The eval_gradients() methods duplicate much of the code of the eval() methods. To increase the maintainability of the code, the eval_gradients() methods have been removed, and the computation of partial derivatives is now done by the eval() methods if the optional gradients argument is set to true.
-
…or the observation Python module. The classname() method returns in a human readable format the class name. This method is needed for full automatic typecasting in Python. Full automatic typecasting has for the moment been implemented for the observation module.
-
The coding and design conventions (CDC) document was also updated.
-
Initially, there was a unlogic relation between GModels and GOptimizerPars, where GModels derives from GOptimizerPars, but both classes contained different types of objects. GModels is a model container, while GOptimizerPars is a parameter container. Now, GModels derives directly from GContainer and no longer from GOptimizerPars. The GModels::pars() method has been added to extract a flat array of model parameter pointers into a GOptimizerPars object. GOptimizerPars, which was abstract before, is now a real container class that also derives from GContainer.
-
Add GChatter argument to print() method. The print() method now takes an argument of type GChatter to control the chattiness of the output in a homogenous manner. Pass NORMAL chatter level in __str__ method. Add chatter argument to print() methods. Use GLog::chatter() method to control the chattiness of the log stream operator. Add chatter() methods and provide member access through const references. Add chatter() methods, provide member access through const references, and declare one liners as inline methods. The chatter() methods control the new m_chatter attribute that is used to control the chattiness of the object's print() methods. name() and version() methods return const references. logFileOpen() method now sets the chattiness from the applications's chatter parameter, and name() and version() methods now return a const reference.
-
…d Doxygen documentation for class with examples. The index access operators [] have now be placed inline so that faster code can be generated (as the index operator does not index checking it is now pretty short code). The hasmodel() methods should semantically be named contains() (in general, a container should always have the contains() method to check for names). The Doxygen documentation of the class has been enhanced, adding usage example to the general description.
-
The at() methods provide model access by index with index validity checking. The hasmodel() method checks whether a model with a given name exists in the container.
-
The methods that are implemented in the header file are now explicitely declared inline and put in a dedicated section after the class declaration. This enables proper documentation of the methods. A small semantic bug was also fixed in the reserve() method where the reserve class was put after return. This apparently worked, but is not correct as the method returns void.
-
Checks for pointer validity are not needed, as pointers should be always valid by construction.
-
This reverts commit 813252eb589e317fd139d0cdde4f20bdd7959ef2.
-
This reverts commit 813252eb589e317fd139d0cdde4f20bdd7959ef2.
-
The GModels model access operator[] now returns a reference instead of a pointer. This needed a couple of minor adjustments of the code.
-
The container class method name pop() was changed to remove() to be complatible with the Python syntax for lists.
-
GModels derives from GOptimizerPars, which is now a container class. GModels needs therefore to implement all container class methods. Methods have been added to insert and remove models, and to extend the model container by another model container.
-
I went over all .hpp to make sure that the GBase.hpp file is properly included, and no supoerfluous other includes remain. I also checked that no ostream and GLog friends are no longer available. I went over all .i files to make sure that classes are derived from GBase.
-
All classes now derive from GBase. ostream and GLog friends are removed since they are now implement at the GBase level.
-
Following the coding & design standard, the GModel argument in the set() method is now passed by reference. This removes the possibility of setting a model pointer to NULL. Thus, by construction, the container should never hold any NULL pointer.
-
The set method now takes a pointer instead of a reference. This allows assignment of a NULL pointer to the list of pointers in the container.
-
The GModel access operator now returns a simple GModel pointer, hence it cannot be used as an lvalue anymore. This is required to proteced the class from code slicing or memory leaks. Setting of GModel elements is now achieved by the set methods. Two variants have been implemented, one taking an index, the other taking a model name.
-
The GModel access operator returns now a reference to a pointer instead of a reference. This allows proper assignment in C++ using constructs such as m[0] = &model;. Also in Python assignment is now possible. For the Python interface we selected to make a deep copy to get a behavior that is compliant with Python list access.
-
…val() and eval_gradients() const