pub struct Subproblem<'a> { /* private fields */ }Expand description
The trust-region subproblem at one outer iteration, in scaled coordinates.
Holds the column-scaled Jacobian J̃ and scaled gradient g̃; a solver
returns a scaled step δ̃ with ‖δ̃‖ ≤ Δ.
Implementations§
Source§impl<'a> Subproblem<'a>
impl<'a> Subproblem<'a>
Sourcepub fn new(jacobian: MatRef<'a, f64>, gradient: MatRef<'a, f64>) -> Self
pub fn new(jacobian: MatRef<'a, f64>, gradient: MatRef<'a, f64>) -> Self
Build a subproblem view over the scaled Jacobian and scaled gradient.
Sourcepub fn jacobian(&self) -> MatRef<'_, f64>
pub fn jacobian(&self) -> MatRef<'_, f64>
The column-scaled Jacobian J̃ (m×p). Dense methods (dogleg) form the
Gauss–Newton system from it; Krylov methods should prefer hvec.
Sourcepub fn jvec(&self, v: MatRef<'_, f64>) -> Mat<f64>
pub fn jvec(&self, v: MatRef<'_, f64>) -> Mat<f64>
Matrix-free product J̃·v (m×1) — never forms J̃ᵀJ̃.
Sourcepub fn hvec(&self, v: MatRef<'_, f64>) -> Mat<f64>
pub fn hvec(&self, v: MatRef<'_, f64>) -> Mat<f64>
Hessian–vector product H·v = J̃ᵀ(J̃·v) (p×1) without forming H.
Sourcepub fn predicted_reduction(&self, s: MatRef<'_, f64>) -> f64
pub fn predicted_reduction(&self, s: MatRef<'_, f64>) -> f64
Predicted reduction of ½‖r‖² for a scaled step δ̃:
−g̃ᵀδ̃ − ½‖J̃δ̃‖² (positive for a descent step).
Auto Trait Implementations§
impl<'a> Freeze for Subproblem<'a>
impl<'a> RefUnwindSafe for Subproblem<'a>
impl<'a> Send for Subproblem<'a>
impl<'a> Sync for Subproblem<'a>
impl<'a> Unpin for Subproblem<'a>
impl<'a> UnsafeUnpin for Subproblem<'a>
impl<'a> UnwindSafe for Subproblem<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more