Skip to main content

ConjugateGradientConfig

Struct ConjugateGradientConfig 

Source
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>,

Source

pub fn new() -> Self
where L: Default,

Create a configuration with default hyperparameters.

Replace the line-search implementation, changing the configuration’s line-search type.

Source

pub const fn with_update(self, update: ConjugateGradientUpdate) -> Self

Select the coefficient update formula.

Source

pub fn with_transform<X>(self, transform: X) -> Self
where X: Transform<T, B> + 'static,

Configure a coordinate transform.

Trait Implementations§

Source§

impl<T, B, L> Default for ConjugateGradientConfig<T, B, L>
where T: RealScalar, B: LinearAlgebra<T>, L: Default,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

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>>

A helper method to get the mutable internal parameter name storage.
Source§

fn with_parameter_names<I, S>(self, parameter_names: I) -> Self
where I: IntoIterator<Item = S>, S: AsRef<str>,

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,

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<()>

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.