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 = Float> + 'a
pub fn fitness<'a>( &'a self, solution: &'a InsertionContext, ) -> impl Iterator<Item = Float> + '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§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