pub trait FirstOrderRootFindingIncremental<F, J, X> {
// Required method
fn root_incremental(
&self,
function: impl FnMut(&X) -> Result<F, String>,
jacobian: impl FnMut(&X) -> Result<J, String>,
update: impl FnMut(&X, &Vector, Scalar, bool) -> Result<(), String>,
initial_guess: X,
equality_constraint: EqualityConstraint,
sparse: Option<SparseSolver>,
) -> Result<X, OptimizationError>;
}Expand description
First-order root-finding algorithms that hand out each increment before applying it.
The solver keeps the iteration; the increment is only lent to the caller so that whatever was eliminated from the system can be carried along with it.
The increment is lent whole, with the step it is about to be scaled by alongside. Elimination solves one direction for the eliminated variables and the retained ones together, so shortening the step has to shorten both by the same amount, exactly as it would if nothing had been eliminated. Handing over the shortened increment instead would invite a fresh solve against it, which is a different direction rather than less of the same one.
A step is offered before it is taken. The caller is asked to report whether the state it arrives at is admissible, and only later told to keep it.
Required Methods§
fn root_incremental( &self, function: impl FnMut(&X) -> Result<F, String>, jacobian: impl FnMut(&X) -> Result<J, String>, update: impl FnMut(&X, &Vector, Scalar, bool) -> Result<(), String>, initial_guess: X, equality_constraint: EqualityConstraint, sparse: Option<SparseSolver>, ) -> Result<X, OptimizationError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".