pub struct Goal { /* private fields */ }
Expand description
Specifies a goal of optimization as a list of Feature
objectives with rules in lexicographical order.
Implementations§
source§impl Goal
impl Goal
sourcepub fn simple(features: &[Feature]) -> GenericResult<Self>
pub fn simple(features: &[Feature]) -> GenericResult<Self>
Creates a goal using objectives from given list of features in lexicographical order. See GoalBuilder for more complex options.
source§impl Goal
impl Goal
sourcepub fn total_order(
&self,
a: &InsertionContext,
b: &InsertionContext,
) -> Ordering
pub fn total_order( &self, a: &InsertionContext, b: &InsertionContext, ) -> Ordering
Compares two solutions from optimization goal point of view and returns their comparison order.
sourcepub fn estimate(&self, move_ctx: &MoveContext<'_>) -> InsertionCost
pub fn estimate(&self, move_ctx: &MoveContext<'_>) -> InsertionCost
Estimates insertion cost (penalty) of the refinement move.
sourcepub fn fitness<'a>(
&'a self,
solution: &'a InsertionContext,
) -> impl Iterator<Item = f64> + 'a
pub fn fitness<'a>( &'a self, solution: &'a InsertionContext, ) -> impl Iterator<Item = f64> + 'a
Calculates solution’s fitness.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Goal
impl !RefUnwindSafe for Goal
impl Send for Goal
impl Sync for Goal
impl Unpin for Goal
impl !UnwindSafe for Goal
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬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