pub struct OptimizerBenchmark<A: Float> { /* private fields */ }Expand description
Optimizer benchmark suite
Implementations§
Source§impl<A: Float + ScalarOperand + Debug + Send + Sync> OptimizerBenchmark<A>
impl<A: Float + ScalarOperand + Debug + Send + Sync> OptimizerBenchmark<A>
Sourcepub fn add_test_function(&mut self, testfunction: TestFunction<A>)
pub fn add_test_function(&mut self, testfunction: TestFunction<A>)
Add a test function to the benchmark suite
Sourcepub fn add_standard_test_functions(&mut self)
pub fn add_standard_test_functions(&mut self)
Add standard test functions
Sourcepub fn run_benchmark<F>(
&mut self,
optimizername: String,
optimization_step: F,
max_iterations: usize,
tolerance: A,
) -> Result<Vec<BenchmarkResult<A>>>
pub fn run_benchmark<F>( &mut self, optimizername: String, optimization_step: F, max_iterations: usize, tolerance: A, ) -> Result<Vec<BenchmarkResult<A>>>
Run benchmark on a specific optimizer
Sourcepub fn get_results(&self) -> &[BenchmarkResult<A>]
pub fn get_results(&self) -> &[BenchmarkResult<A>]
Get all benchmark results
Sourcepub fn clear_results(&mut self)
pub fn clear_results(&mut self)
Clear all results
Sourcepub fn generate_report(&self) -> BenchmarkReport<A>
pub fn generate_report(&self) -> BenchmarkReport<A>
Generate performance comparison report
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for OptimizerBenchmark<A>
impl<A> !RefUnwindSafe for OptimizerBenchmark<A>
impl<A> !Send for OptimizerBenchmark<A>
impl<A> !Sync for OptimizerBenchmark<A>
impl<A> Unpin for OptimizerBenchmark<A>where
A: Unpin,
impl<A> UnsafeUnpin for OptimizerBenchmark<A>
impl<A> !UnwindSafe for OptimizerBenchmark<A>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.