pub struct GeneticAlgorithm {
pub population_size: usize,
pub crossover_prob: f64,
pub mutation_prob: Option<f64>,
pub sbx_eta: f64,
pub mutation_eta: f64,
pub tournament_size: usize,
/* private fields */
}Expand description
Genetic Algorithm optimizer.
Fields§
§population_size: usizePopulation size (default: 100)
crossover_prob: f64Crossover probability (default: 0.9)
mutation_prob: Option<f64>Mutation probability (default: 1/dim)
sbx_eta: f64SBX distribution index (default: 20)
mutation_eta: f64Polynomial mutation index (default: 20)
tournament_size: usizeTournament size (default: 2)
Implementations§
Trait Implementations§
Source§impl Clone for GeneticAlgorithm
impl Clone for GeneticAlgorithm
Source§fn clone(&self) -> GeneticAlgorithm
fn clone(&self) -> GeneticAlgorithm
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeneticAlgorithm
impl Debug for GeneticAlgorithm
Source§impl Default for GeneticAlgorithm
impl Default for GeneticAlgorithm
Source§impl<'de> Deserialize<'de> for GeneticAlgorithm
impl<'de> Deserialize<'de> for GeneticAlgorithm
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PerturbativeMetaheuristic for GeneticAlgorithm
impl PerturbativeMetaheuristic for GeneticAlgorithm
Source§fn optimize<F>(
&mut self,
objective: &F,
space: &SearchSpace,
budget: Budget,
) -> OptimizationResult<Self::Solution>
fn optimize<F>( &mut self, objective: &F, space: &SearchSpace, budget: Budget, ) -> OptimizationResult<Self::Solution>
Run optimization. Read more
Auto Trait Implementations§
impl Freeze for GeneticAlgorithm
impl RefUnwindSafe for GeneticAlgorithm
impl Send for GeneticAlgorithm
impl Sync for GeneticAlgorithm
impl Unpin for GeneticAlgorithm
impl UnwindSafe for GeneticAlgorithm
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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