CompEvol/beast2

Parameter does not restore properly after dimension change

rbouckaert opened this issue · 0 comments

For a RealParameter, an operator can propose a change of dimension through setDimension().
When store() is called by the MCMC algorithm, the stored value resizes to the new dimension.
If the proposal is rejected, at restore(), the stored value still has the new dimension, but it should resize to the old dimension.

When the new dimensions is larger than the old dimension, it should be possible to cut down to the old dimension based on the stored values. When the old dimension is larger than the new dimension, the information at the highest dimension(s) are lost.

The problem occurs because setDimension() does not call startEditing(), but it should.