pub trait FeatureObjective: Send + Sync {
// Required methods
fn fitness(&self, solution: &InsertionContext) -> Cost;
fn estimate(&self, move_ctx: &MoveContext<'_>) -> Cost;
}
Expand description
Defines feature’s objective function behavior.
Required Methods§
Sourcefn fitness(&self, solution: &InsertionContext) -> Cost
fn fitness(&self, solution: &InsertionContext) -> Cost
An objective fitness value for the given solution
.
Sourcefn estimate(&self, move_ctx: &MoveContext<'_>) -> Cost
fn estimate(&self, move_ctx: &MoveContext<'_>) -> Cost
Estimates the cost of insertion.