pub struct LoggingHook { /* private fields */ }Expand description
Simple logging hook
Implementations§
Trait Implementations§
Source§impl OptimizationHook for LoggingHook
impl OptimizationHook for LoggingHook
Source§fn on_optimization_start(
&mut self,
_config: &PluginConfig,
_constraints: &ParameterConstraints,
) -> Result<(), HookError>
fn on_optimization_start( &mut self, _config: &PluginConfig, _constraints: &ParameterConstraints, ) -> Result<(), HookError>
Called before optimization starts
Source§fn on_iteration_start(
&mut self,
iteration: usize,
_history: &OptimizationHistory,
) -> Result<(), HookError>
fn on_iteration_start( &mut self, iteration: usize, _history: &OptimizationHistory, ) -> Result<(), HookError>
Called before each iteration
Source§fn on_evaluation(
&mut self,
_parameters: &HashMap<String, Float>,
_objective_value: Float,
_iteration: usize,
) -> Result<(), HookError>
fn on_evaluation( &mut self, _parameters: &HashMap<String, Float>, _objective_value: Float, _iteration: usize, ) -> Result<(), HookError>
Called after each evaluation
Source§fn on_iteration_end(
&mut self,
iteration: usize,
history: &OptimizationHistory,
) -> Result<(), HookError>
fn on_iteration_end( &mut self, iteration: usize, history: &OptimizationHistory, ) -> Result<(), HookError>
Called after each iteration
Source§fn on_optimization_end(
&mut self,
history: &OptimizationHistory,
reason: StopReason,
) -> Result<(), HookError>
fn on_optimization_end( &mut self, history: &OptimizationHistory, reason: StopReason, ) -> Result<(), HookError>
Called when optimization completes
Auto Trait Implementations§
impl Freeze for LoggingHook
impl RefUnwindSafe for LoggingHook
impl Send for LoggingHook
impl Sync for LoggingHook
impl Unpin for LoggingHook
impl UnwindSafe for LoggingHook
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<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