srenevey / ode-solvers

Numerical methods to solve ordinary differential equations in Rust.
BSD 3-Clause "New" or "Revised" License
64 stars 26 forks source link

Restrictive type for x (independent variable) and y components (state vector) #20

Closed pekpuglia closed 7 months ago

pekpuglia commented 1 year ago

I am currently working on a simulation project using this crate and egaku. I need to retrieve frame delta-times from egaku, and receive f32's. I must then convert back and forth between f32 and f64. It is a bit annoying, unsafe and inefficient. I believe there would also be demand for some more flexible typing in other parts of this otherwise great crate. Would it be too hard to allow for f64 storage types? I believe it may be a simple matter of adding some generics.

DarthB commented 9 months ago

I have a similar issue with plotters.

DarthB commented 9 months ago

If that's in the spirit of the maintainers I would also look into this when working on Move Instead Copy via From Trait

srenevey commented 9 months ago

I'm open to the suggestion, having more flexibility for the type would be good. If @DarthB wants to work on this as part of his other suggestion that would be great.