It came up in the context of rigid bodies that certain optimizers
(namely CG) like to have all their parameters vary over a similar
scale. As a result, it can be important to rescale non-xyz
attributes. One way of doing this would be to add a method to Model:
FloatPair get_range(FloatKey) which returns the current range of
values for a particular FloatKey. Then CG could use that to rescale
all its values internally.
something like that would be useful indeed. the typical changes of the
values would be of importance for optimizers - the absolute values are
not really important. thus, this function would somehow need to
accumulate knowledge on the magnitude of changes for the variables
throughout optimization.
cheers
frido
If it is useful to be able to override the range, we could also add
set_range which allows you to set the expected range (perhaps even
allowed range) for a given attribute type.
Both of these would be relatively easy to implement on the Model
side. The CG code is a bit hairy, so tweaking that could take more
work (and is probably best done by adding another set of methods to
access the values in the Optimizer base class).