Scalar now inherits num-dual's DualNum<Primitive = f64> and
DualStruct<Real = f64> and declares only lift. re comes from DualStruct.
A blanket impl replaces impl Scalar for f64 and the impl_scalar! macro
over the dual types, so Scalar covers f64 and every num-dual dual type
and a sibling crate built on num-dual can share one bound.
num-dual is a plain dependency rather than optional.
Breaks: the autodiff feature is removed, so a dependent naming it in its
feature list no longer resolves. Scalar's blanket impl makes any manual
impl of it a conflicting implementation, and Scalar no longer declares
re, so a qualified Scalar::re(&x) call must become x.re().
A Problem can own a callback as well as borrow one. with_owned_callback takes a
Box<dyn Callback + 'o>, which is what a type that stores the Problem needs: it
cannot lend a callback from one of its own fields without becoming
self-referential.
Problem gains a second lifetime for this, Problem<'a, 'o, T, D, S, P, C>, so code
that names the type explicitly needs Problem<'a, '_, ..>. Both are inferred and no
call site changes. The lifetimes have to be separate because dropping a
Box<dyn Callback> runs a destructor the compiler cannot see into, and sharing one
lifetime would keep a borrowed callback borrowed until the problem went out of
scope, which is exactly what the borrowed form exists to avoid.
Event location, root finding, jump recording and the controller reset are
unchanged.
Documentation and housekeeping only; the library behaves exactly as 0.6.0 does.
Three rustdoc warnings in the Jacobian comment are gone, so the formulas there
render as code rather than as attempted links, the tree is rustfmt-clean with the
Butcher tableaux and interpolation coefficients marked to keep their hand
alignment, and the git hooks stay out of the package.
exclude covered roadmap/ but not hooks/, so the pre-commit and pre-push scripts
would have gone out in the next crate tarball. They are for working in the repo
and mean nothing to a consumer of the library.
Callback effects can change the state. The effect runs after the step has been
shortened to the crossing and committed, so what it leaves in ode.y is what the
integration continues from; it was overwritten immediately before. Callback::effect
takes &mut self, Problem::with_callback takes &mut dyn Callback, and Controller
requires a reset method, all of which are breaking. A jump records the state on
both sides of itself and resets the step size controller, interpolating at one
reports the state the effect left, stop ends the solution at the crossing without
disturbing t_end, and the earliest of two events in one step is the one that fires.
Runtime integrator selection. The structural facts on Integrator move from
associated constants to &self methods, which is a breaking change for anyone
implementing the trait or reading ORDER, STAGES, ADAPTIVE or DENSE. In exchange
Method dispatches to any of the four integrators as a value, and MethodName
names one in a configuration file.
The Tolerances trait: the a_tol, a_tol_full and r_tol setters move off the
inherent impls onto a trait, with absolute_tolerance and relative_tolerance
getters, so code generic over the integrator can set and read them.
- repository pointed at the old host and the old repo name; this is the link
crates.io and docs.rs display
- the readme example imported `differential_equations`, so it could not
compile under the crate's published name
- `cargo bench` did not build: `Solution` borrows the ODE, so `.solve()`
cannot be called on a temporary `Problem`. Bind it first.
Bumps the version to 0.3.0 and keeps the roadmap notes out of the published
artifact. No source changes: this tags the BS3, Vern7, Rosenbrock23 and
PIDController work that has accumulated on main since 0.2.3.