probnum
probnum copied to clipboard
Have `statespace.Preconditioner` subclasses implement `LinearOperator` and remove `statespace.Preconditioner`
In a Nutshell
The statespace
module has a general abstract class Preconditioner
which implements a inverse
method. This duplicates functionality of LinearOperator
with different method naming.
In Detail
Coordinate change transformations in state-space models used as preconditioners have their own abstract class in statespace
. This class only implements __call__
and inverse
and does not inherit from LinearOperator
, which has .inv()
. Preconditioners will be used more widely in the library and if they warrant a common base class should be handled as LinearOperator
s.
ToDo
- [x] Determine what function the
Preconditioner
class serves and whether it has any functionality beyondLinearOperator
- [ ] Make
statespace.Preconditioner
subclasses inherit fromLinearOperator
- [ ] Remove
statespace.Preconditioner
Regarding the first point: they only implement coordinate changes. The LinearOperator interface should suffice. If preconditioner-operators (or coordinate-change operators) are to be used more widely in probnum, we can move it to linops.