pub struct PolynomialMutation {
pub eta_m: f64,
pub mutation_probability: Option<f64>,
pub unbounded_sigma: Option<f64>,
}Expand description
Polynomial mutation (bounded)
Uses the polynomial probability distribution to perturb genes. Respects bounds and is commonly used with NSGA-II.
Reference: Deb, K. (2001). Multi-Objective Optimization using Evolutionary Algorithms.
Fields§
§eta_m: f64Distribution index (typically 20-100) Higher values = smaller mutations
mutation_probability: Option<f64>Per-gene mutation probability (default: 1/n)
unbounded_sigma: Option<f64>Standard deviation used by the unbounded fallback (see
MutationOperator::mutate). None selects the adaptive default
0.1 * (1 + |x|) per gene; Some(s) uses a fixed s.
Implementations§
Source§impl PolynomialMutation
impl PolynomialMutation
Sourcepub fn new(eta_m: f64) -> Self
pub fn new(eta_m: f64) -> Self
Create a new polynomial mutation with the given distribution index
Sourcepub fn with_probability(self, probability: f64) -> Self
pub fn with_probability(self, probability: f64) -> Self
Set a fixed mutation probability per gene
Sourcepub fn with_unbounded_sigma(self, sigma: f64) -> Self
pub fn with_unbounded_sigma(self, sigma: f64) -> Self
Set the standard deviation of the unbounded Gaussian fallback.
Polynomial mutation is only defined relative to finite bounds; when the
operator is invoked without bounds it perturbs each gene with Gaussian
noise instead (audit EV-102). By default the per-gene sigma is
0.1 * (1 + |x|); this method pins it to a fixed value.
Trait Implementations§
Source§impl BoundedMutationOperator<RealVector> for PolynomialMutation
impl BoundedMutationOperator<RealVector> for PolynomialMutation
Source§fn mutate_bounded<R: Rng>(
&self,
genome: &mut RealVector,
bounds: &MultiBounds,
rng: &mut R,
)
fn mutate_bounded<R: Rng>( &self, genome: &mut RealVector, bounds: &MultiBounds, rng: &mut R, )
Source§impl Clone for PolynomialMutation
impl Clone for PolynomialMutation
Source§fn clone(&self) -> PolynomialMutation
fn clone(&self) -> PolynomialMutation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PolynomialMutation
impl Debug for PolynomialMutation
Source§impl TunableMutation for PolynomialMutation
impl TunableMutation for PolynomialMutation
Source§fn set_mutation_probability(&mut self, probability: f64)
fn set_mutation_probability(&mut self, probability: f64)
mutate calls. Read moreAuto Trait Implementations§
impl Freeze for PolynomialMutation
impl RefUnwindSafe for PolynomialMutation
impl Send for PolynomialMutation
impl Sync for PolynomialMutation
impl Unpin for PolynomialMutation
impl UnsafeUnpin for PolynomialMutation
impl UnwindSafe for PolynomialMutation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.