pub struct ConjugateGradientConfig<T: RealScalar = f64, B: LinearAlgebra<T> = NalgebraProvider, L = StrongWolfeLineSearch<T, B>> { /* private fields */ }Expand description
Configuration for the scalar- and linear-algebra-generic nonlinear conjugate-gradient optimizer.
Implementations§
Source§impl<T, B, L> ConjugateGradientConfig<T, B, L>where
T: RealScalar,
B: LinearAlgebra<T>,
impl<T, B, L> ConjugateGradientConfig<T, B, L>where
T: RealScalar,
B: LinearAlgebra<T>,
Sourcepub fn with_line_search<N>(
self,
line_search: N,
) -> ConjugateGradientConfig<T, B, N>
pub fn with_line_search<N>( self, line_search: N, ) -> ConjugateGradientConfig<T, B, N>
Replace the line-search implementation, changing the configuration’s line-search type.
Sourcepub const fn with_update(self, update: ConjugateGradientUpdate) -> Self
pub const fn with_update(self, update: ConjugateGradientUpdate) -> Self
Select the coefficient update formula.
Sourcepub fn with_transform<X>(self, transform: X) -> Selfwhere
X: Transform<T, B> + 'static,
pub fn with_transform<X>(self, transform: X) -> Selfwhere
X: Transform<T, B> + 'static,
Configure a coordinate transform.
Trait Implementations§
Source§impl<T, B, L> Default for ConjugateGradientConfig<T, B, L>
impl<T, B, L> Default for ConjugateGradientConfig<T, B, L>
Source§impl<T: RealScalar, B: LinearAlgebra<T>, L> SupportsParameterNames for ConjugateGradientConfig<T, B, L>
impl<T: RealScalar, B: LinearAlgebra<T>, L> SupportsParameterNames for ConjugateGradientConfig<T, B, L>
Source§fn get_parameter_names_mut(&mut self) -> &mut Option<Vec<String>>
fn get_parameter_names_mut(&mut self) -> &mut Option<Vec<String>>
A helper method to get the mutable internal parameter name storage.
Source§fn with_parameter_names<I, S>(self, parameter_names: I) -> Self
fn with_parameter_names<I, S>(self, parameter_names: I) -> Self
Set the names associated with each parameter.
Source§impl<T, B, L, P, U, E> Terminator<ConjugateGradient<T, B, L>, P, GradientStatus<T, B>, U, E, ConjugateGradientConfig<T, B, L>> for ConjugateGradientGTerminator<T>where
T: RealScalar,
B: LinearAlgebra<T> + PseudoInverse<T>,
P: Gradient<T, B, U, E>,
L: for<'a> LineSearch<T, B, TransformedProblem<'a, P, T, B>, U, E> + Clone + Default + Send + Sync,
impl<T, B, L, P, U, E> Terminator<ConjugateGradient<T, B, L>, P, GradientStatus<T, B>, U, E, ConjugateGradientConfig<T, B, L>> for ConjugateGradientGTerminator<T>where
T: RealScalar,
B: LinearAlgebra<T> + PseudoInverse<T>,
P: Gradient<T, B, U, E>,
L: for<'a> LineSearch<T, B, TransformedProblem<'a, P, T, B>, U, E> + Clone + Default + Send + Sync,
Source§fn check_for_termination(
&mut self,
_current_step: usize,
algorithm: &mut ConjugateGradient<T, B, L>,
_problem: &P,
status: &mut GradientStatus<T, B>,
_args: &U,
_config: &ConjugateGradientConfig<T, B, L>,
) -> ControlFlow<()>
fn check_for_termination( &mut self, _current_step: usize, algorithm: &mut ConjugateGradient<T, B, L>, _problem: &P, status: &mut GradientStatus<T, B>, _args: &U, _config: &ConjugateGradientConfig<T, B, L>, ) -> ControlFlow<()>
A termination check which is called on each step of an
Algorithm.Auto Trait Implementations§
impl<T = f64, B = NalgebraProvider, L = StrongWolfeLineSearch<T, B>> !RefUnwindSafe for ConjugateGradientConfig<T, B, L>
impl<T = f64, B = NalgebraProvider, L = StrongWolfeLineSearch<T, B>> !UnwindSafe for ConjugateGradientConfig<T, B, L>
impl<T, B, L> Freeze for ConjugateGradientConfig<T, B, L>where
L: Freeze,
impl<T, B, L> Send for ConjugateGradientConfig<T, B, L>where
L: Send,
impl<T, B, L> Sync for ConjugateGradientConfig<T, B, L>where
L: Sync,
impl<T, B, L> Unpin for ConjugateGradientConfig<T, B, L>where
L: Unpin,
impl<T, B, L> UnsafeUnpin for ConjugateGradientConfig<T, B, L>where
L: UnsafeUnpin,
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.