pub struct Objective {
pub column: String,
pub goal: Goal,
pub aggregate: Aggregate,
}Expand description
Output a search scores candidates by, and the direction it prefers.
Fields§
§column: StringOutput column, a reducer column such as Infected:max.
goal: GoalDirection the search prefers.
aggregate: AggregateRule that folds the replicates of a candidate into one value.
Implementations§
Source§impl Objective
impl Objective
Sourcepub fn score(&self, evaluation: &Evaluation) -> f64
pub fn score(&self, evaluation: &Evaluation) -> f64
Returns the objective over the replicates of evaluation, from the first watched column.
A failed replicate, missing or not finite, counts as Goal::worst.
Trait Implementations§
impl Eq for Objective
impl StructuralPartialEq for Objective
Auto Trait Implementations§
impl Freeze for Objective
impl RefUnwindSafe for Objective
impl Send for Objective
impl Sync for Objective
impl Unpin for Objective
impl UnsafeUnpin for Objective
impl UnwindSafe for Objective
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