pub struct DifferentialEvolution<'a, F>{ /* private fields */ }Expand description
Differential Evolution optimizer.
A population-based stochastic optimizer for continuous functions.
Use DifferentialEvolution::new to create an instance, configure
with config_mut, then call solve.
Implementations§
Source§impl<'a, F> DifferentialEvolution<'a, F>
impl<'a, F> DifferentialEvolution<'a, F>
Sourcepub fn new(func: &'a F, lower: Array1<f64>, upper: Array1<f64>) -> Result<Self>
pub fn new(func: &'a F, lower: Array1<f64>, upper: Array1<f64>) -> Result<Self>
Creates a new DE optimizer with objective func and bounds [lower, upper].
§Errors
Returns DEError::BoundsMismatch if lower and upper have different lengths.
Returns DEError::InvalidBounds if any lower bound exceeds its corresponding upper bound.
Sourcepub fn config_mut(&mut self) -> &mut DEConfig
pub fn config_mut(&mut self) -> &mut DEConfig
Mutable access to configuration
Auto Trait Implementations§
impl<'a, F> Freeze for DifferentialEvolution<'a, F>
impl<'a, F> !RefUnwindSafe for DifferentialEvolution<'a, F>
impl<'a, F> !Send for DifferentialEvolution<'a, F>
impl<'a, F> !Sync for DifferentialEvolution<'a, F>
impl<'a, F> Unpin for DifferentialEvolution<'a, F>
impl<'a, F> UnsafeUnpin for DifferentialEvolution<'a, F>
impl<'a, F> !UnwindSafe for DifferentialEvolution<'a, F>
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