pub trait LineSearchCondition<T, F>: Serialize {
// Required methods
fn eval(
&self,
cur_cost: F,
cur_grad: T,
init_cost: F,
init_grad: T,
search_direction: T,
alpha: F,
) -> bool;
fn requires_cur_grad(&self) -> bool;
}
Expand description
Needs to be implemented by everything that wants to be a LineSearchCondition
Required Methods§
Sourcefn eval(
&self,
cur_cost: F,
cur_grad: T,
init_cost: F,
init_grad: T,
search_direction: T,
alpha: F,
) -> bool
fn eval( &self, cur_cost: F, cur_grad: T, init_cost: F, init_grad: T, search_direction: T, alpha: F, ) -> bool
Evaluate the condition
Sourcefn requires_cur_grad(&self) -> bool
fn requires_cur_grad(&self) -> bool
Indicates whether this condition requires the computation of the gradient at the new point
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.