pub struct AdaptiveOptimizer { /* private fields */ }Expand description
Runtime algorithm selector
Implementations§
Source§impl AdaptiveOptimizer
impl AdaptiveOptimizer
Sourcepub fn set_auto_tuning(&mut self, enabled: bool)
pub fn set_auto_tuning(&mut self, enabled: bool)
Enable or disable auto-tuning
Sourcepub fn set_learning_rate(&mut self, rate: f64)
pub fn set_learning_rate(&mut self, rate: f64)
Set learning rate for performance adaptation
Sourcepub fn select_algorithm<'a, T>(
&self,
variants: &'a [Box<dyn AlgorithmVariant<T>>],
input: &T,
strategy: DispatchStrategy,
) -> Option<&'a dyn AlgorithmVariant<T>>
pub fn select_algorithm<'a, T>( &self, variants: &'a [Box<dyn AlgorithmVariant<T>>], input: &T, strategy: DispatchStrategy, ) -> Option<&'a dyn AlgorithmVariant<T>>
Select best algorithm variant based on strategy
Sourcepub fn execute_with_tracking<T>(
&self,
variant: &dyn AlgorithmVariant<T>,
input: &T,
) -> Result<T, AlgorithmError>
pub fn execute_with_tracking<T>( &self, variant: &dyn AlgorithmVariant<T>, input: &T, ) -> Result<T, AlgorithmError>
Execute algorithm with performance tracking
Sourcepub fn get_performance_stats(
&self,
algorithm_name: &str,
) -> Option<AlgorithmPerformance>
pub fn get_performance_stats( &self, algorithm_name: &str, ) -> Option<AlgorithmPerformance>
Get performance statistics for an algorithm
Sourcepub fn auto_tune_parameters<T, P>(
&self,
algorithm_factory: impl Fn(P) -> Box<dyn AlgorithmVariant<T>>,
parameter_ranges: Vec<(P, P)>,
test_inputs: &[T],
iterations: usize,
) -> P
pub fn auto_tune_parameters<T, P>( &self, algorithm_factory: impl Fn(P) -> Box<dyn AlgorithmVariant<T>>, parameter_ranges: Vec<(P, P)>, test_inputs: &[T], iterations: usize, ) -> P
Auto-tune parameters for an algorithm
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AdaptiveOptimizer
impl RefUnwindSafe for AdaptiveOptimizer
impl Send for AdaptiveOptimizer
impl Sync for AdaptiveOptimizer
impl Unpin for AdaptiveOptimizer
impl UnsafeUnpin for AdaptiveOptimizer
impl UnwindSafe for AdaptiveOptimizer
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
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