#[non_exhaustive]pub enum Zdt {
One,
Two,
Three,
}Expand description
One of the three problems.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Implementations§
Source§impl Zdt
impl Zdt
Sourcepub fn evaluate(self, x: &[f64]) -> Vec<f64>
pub fn evaluate(self, x: &[f64]) -> Vec<f64>
The problem’s two goals at x, [f₁, f₂]; x₀ is taken as 0 if x is empty.
Sourcepub fn pieces(self) -> &'static [(f64, f64)]
pub fn pieces(self) -> &'static [(f64, f64)]
The f₁ ranges of the front’s pieces: one for ZDT1 and ZDT2, five for ZDT3.
Sourcepub fn reference(self, points: usize) -> Vec<Vec<f64>>
pub fn reference(self, points: usize) -> Vec<Vec<f64>>
points points of the front, f₁ evenly spaced from 0 to 1, those outside ZDT3’s
pieces left out: a reference for
inverted_generational_distance.
Sourcepub fn distance_to_front(self, f: &[f64]) -> f64
pub fn distance_to_front(self, f: &[f64]) -> f64
The Euclidean distance from goals f = [f₁, f₂] to the front, the curve itself
rather than points along it.
Any point of the front bounds it, so the nearest point lies within f₁ ± d₀ of f₁,
where d₀ is the distance to the front at f₁ itself (or a piece’s nearer end):
that window of each piece is searched on a grid of 400 steps in s (f₁ = s² for
ZDT1 and ZDT3, whose slope is infinite at 0; f₁ = s for ZDT2), and the best step
refined by golden-section search over its two neighbours.
Trait Implementations§
impl Copy for Zdt
Source§impl<'de> Deserialize<'de> for Zdt
impl<'de> Deserialize<'de> for Zdt
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>,
impl Eq for Zdt
impl StructuralPartialEq for Zdt
Auto Trait Implementations§
impl Freeze for Zdt
impl RefUnwindSafe for Zdt
impl Send for Zdt
impl Sync for Zdt
impl Unpin for Zdt
impl UnsafeUnpin for Zdt
impl UnwindSafe for Zdt
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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