pub struct Goal {
pub target: Target,
pub alternatives: Option<(Vec<Target>, f64)>,
}
Expand description
A Goal
type defines the goal of optimization in terms of feature names.
Fields§
§target: Target
A target objective of optimization specified by user explicitly or implicitly.
alternatives: Option<(Vec<Target>, f64)>
Alternative objectives with their probability weight which help solver to have a better exploration during the search phase.
Implementations§
source§impl Goal
impl Goal
sourcepub fn no_alternatives<I>(global: I, local: I) -> Self
pub fn no_alternatives<I>(global: I, local: I) -> Self
Creates instance of Goal
without alternatives.
sourcepub fn with_alternatives<I>(
global: I,
local: I,
alternatives: (Vec<(I, I)>, f64)
) -> Self
pub fn with_alternatives<I>( global: I, local: I, alternatives: (Vec<(I, I)>, f64) ) -> Self
Creates instance of Goal
with alternatives. The general idea behind alternatives is to
allow search to explore solution space better, temporary switch a target objective function
to one of alternatives.
Trait Implementations§
Auto Trait Implementations§
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