pub trait Step<T>: Sync {
type Cell: AtomicCell<T>;
// Required method
fn run<G, N>(&self, idx: usize, get: G, neighbors: N) -> (f64, Option<T>)
where G: Fn(usize) -> T,
N: Iterator<Item = usize>;
}Expand description
A per-root Newton correction step shared by every execution policy.
run(idx, get, neighbors) computes one correction for root/factor idx:
get(j)reads the current value of root/factorjfrom the policy’s data layout (live state, frozen snapshot, or seqlock buffer).neighborsenumerates the indices of the other roots/factors to suppress (ascending order, or round-robin for the atomic variant).
Returns (tol, Some(new_value)) when the root was updated, or
(0.0, None) when it is already converged (below options.tol_ind).
This mirrors the per-algorithm step functors (even_bairstow_step,
autocorr_bairstow_step, aberth_step, …) in ginger-cpp’s
execution_policy.hpp.
Required Associated Types§
Sourcetype Cell: AtomicCell<T>
type Cell: AtomicCell<T>
Atomic cell type used by the decoupled atomic policy for this step.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".