tcunis / bisosprob

Toolbox for bilinear sum-of-squares problems.
4 stars 3 forks source link

[bisos.iteration] Add step-table to info struct. #14

Closed tcunis closed 2 years ago

tcunis commented 2 years ago

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 by bisos.iteration.Step#tostr).

For easy use, this pull requests also adds getter and setter as protected methods to bisos.prob.Step, namely getinfo and setinfo, 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.

tcunis commented 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.