leouieda/fatiando — pull request #127 by leouieda (2014-09-21 16:02:59+00:00)
Title: Refactor fatiando.inversion to use abstract base classes and smarter caching

Using ABCMeta, smarter cache system, summing makes a Composite object, index a Composite to get the Objectives within, easier subclassing, no need to overload `fit` because `estimate_` property calls `fmt_estimate`, better reprs.

Current issues:

- [ ] When adding 3, you get an Objective + Composite. So indexing to get the third objective is comp[1][1]. Maybe having a `ravel()` method for this that collapses the Composite. It would need to distribute the regularization parameter to the summed Objectives.

TODO:

- [ ] Better way to implement `subset` method. Maybe get rid of it.
- [ ] Adapt regularizing functions
- [ ] Adapt LCurve
- [ ] Convert inverse problems to new API