Enum BoundaryFix
pub enum BoundaryFix {
Clamp,
Reflect,
}Expand description
How a mutant coordinate that has left [0, 1] is pulled back in.
Both keep the offspring inside the unit hypercube; they differ in how they treat an overshoot, which changes the exploration behaviour at the edges of the space.
Variants§
Clamp
Clamp to the nearer bound (< 0 → 0, > 1 → 1). The default: cheap,
deterministic, and it never draws randomness, but it piles probability
mass on the bounds.
Reflect
Reflect across the violated bound (−0.2 → 0.2, 1.2 → 0.8), folding
repeatedly until the value lands in range. Keeps the interior density
smoother than Clamp at the edges.
Implementations§
Trait Implementations§
§impl Clone for BoundaryFix
impl Clone for BoundaryFix
§fn clone(&self) -> BoundaryFix
fn clone(&self) -> BoundaryFix
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BoundaryFix
§impl Debug for BoundaryFix
impl Debug for BoundaryFix
§impl Default for BoundaryFix
impl Default for BoundaryFix
§impl<'de> Deserialize<'de> for BoundaryFix
impl<'de> Deserialize<'de> for BoundaryFix
§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
impl Eq for BoundaryFix
§impl PartialEq for BoundaryFix
impl PartialEq for BoundaryFix
§impl Serialize for BoundaryFix
impl Serialize for BoundaryFix
impl StructuralPartialEq for BoundaryFix
Auto Trait Implementations§
impl Freeze for BoundaryFix
impl RefUnwindSafe for BoundaryFix
impl Send for BoundaryFix
impl Sync for BoundaryFix
impl Unpin for BoundaryFix
impl UnsafeUnpin for BoundaryFix
impl UnwindSafe for BoundaryFix
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