CUQI-DTU / CUQIpy

https://cuqi-dtu.github.io/CUQIpy/
Apache License 2.0
41 stars 7 forks source link

Create common class for SamplerNew and GibbsNew #426

Open nabriis opened 2 months ago

nabriis commented 2 months ago

Currently SamplerNew assumes a single vector for the current point. The Gibbs sampler assumes "current_points" to be a dictionary of vectors. Thus one cannot subclass GibbsNew from SamplerNew. Instead we could create a common parent class that contains most of the expected interfaces with no assumptions on datastructures.

          As discussed, the suggestion for now would be to create (and reference in this PR) a new issue on subclassing Gibbs from `SamplerNew`. This issue should explain what caused this to not be done in the present PR.

_Originally posted by @jakobsj in https://github.com/CUQI-DTU/CUQIpy/pull/425#discussion_r1619188796_