Closed tcunis closed 2 years ago
Issue #12 raised the following question concerning the type of the info struct:
As for the implementation, keeping [data] structs would be preferable from the user perspective (ease to inspect log post iteration) but a new class would be beneficial from an implementation point of view (e.g., limitation of available member fields).
I have kept a data struct for now (for the reason detailed), yet I am noting that implementing the access to the step-specific information would be more elegant if subsref
and subsasgn
could be overloaded, requiring the info struct to be its own class rather.
In response to Issue #12, this pull request adds a single-row table to the info struct that allows separate steps of [
bisos.iteration
] to log and store specific information. The table data can be accessed using the step signature (as returned bybisos.iteration.Step#tostr
).For easy use, this pull requests also adds getter and setter as protected methods to
bisos.prob.Step
, namelygetinfo
andsetinfo
, respectively.After
bisos.iteration
is finished, the step-specific information of each iteration are returned in a table of which the number of rows corresponds to the number of iterations executed.