Closed cschwan closed 3 years ago
That's surely the right place, because those are the exact methods I'll to change. First of all, I'll get rid write_q2_slice
, which is obsolete because we now have ReadOnlySparseSubgrid
- that's going to do the job. This will require bigger changes in the C API though.
I didn't implement the Read
trait because that's not exactly what fill_q2_slice
does. What we need is to export Q^2 slices one by one, skipping empty slices.
Commits be733ac5281414ff7b592699c22b5a53791f2af9, ce5bc1bac83944d88504319b667d5b48107374b2 and f6b932304e7fedd129765b8dcebe98d37adc419b change the way grids are imported, also through the C API. Thanks to those changes we can now import a grid using custom x1/x2/Q2-grid points, by simply specifying them.
Commit b8f46c1f9c3a110238555505d96ccd42824e2f99 removes the q2_slice
methods; instead Subgrid::iter()
can be used.
I'm not sure this is the correct place to tell you, but I was thinking about the
fill/write_q2_slice
issue and I've a suggestion: I said I would have expected aread
method as a partner of thewrite
one, but actually you should be able to implement aread
statement on top of thefill
one already at the abstract level, just allocating - filling - returning the buffer.Is this meaningful for you, or it's trivial and should be done by the user itself to encourage the use of
fill
?