Struct metaheuristics_nature::WithProduct
source · pub struct WithProduct<Y, P: ?Sized> { /* private fields */ }
Expand description
A Fitness
type carrying final results.
You can use Solver::as_best_xs()
/ Solver::as_best_fit()
/
Solver::get_best_eval()
to access product field.
Implementations§
source§impl<Y, P: ?Sized> WithProduct<Y, P>
impl<Y, P: ?Sized> WithProduct<Y, P>
source§impl<Y, P> WithProduct<Y, P>
impl<Y, P> WithProduct<Y, P>
sourcepub fn into_result(self) -> Pwhere
P: Clone,
pub fn into_result(self) -> Pwhere
P: Clone,
Consume and get the final result.
sourcepub fn into_err_result(self) -> (Y::Eval, P)
pub fn into_err_result(self) -> (Y::Eval, P)
Get the fitness value and the final result.
Trait Implementations§
source§impl<Y: Clone, P: Clone + ?Sized> Clone for WithProduct<Y, P>
impl<Y: Clone, P: Clone + ?Sized> Clone for WithProduct<Y, P>
source§fn clone(&self) -> WithProduct<Y, P>
fn clone(&self) -> WithProduct<Y, P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Y: Fitness, P> Fitness for WithProduct<Y, P>where
P: MaybeParallel + Clone + 'static,
impl<Y: Fitness, P> Fitness for WithProduct<Y, P>where
P: MaybeParallel + Clone + 'static,
source§fn is_dominated(&self, rhs: &Self) -> bool
fn is_dominated(&self, rhs: &Self) -> bool
Check if
self
dominates rhs
.Auto Trait Implementations§
impl<Y, P> Freeze for WithProduct<Y, P>
impl<Y, P> RefUnwindSafe for WithProduct<Y, P>
impl<Y, P> Send for WithProduct<Y, P>
impl<Y, P> Sync for WithProduct<Y, P>
impl<Y, P> Unpin for WithProduct<Y, P>
impl<Y, P> UnwindSafe for WithProduct<Y, P>
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