Skip to main content

ScoreBounder

Trait ScoreBounder 

Source
pub trait ScoreBounder<S: PlanningSolution, D: Director<S>>: Send + Debug {
    // Required method
    fn calculate_optimistic_bound(&self, score_director: &D) -> Option<S::Score>;

    // Provided method
    fn calculate_pessimistic_bound(
        &self,
        score_director: &D,
    ) -> Option<S::Score> { ... }
}
Expand description

Calculates score bounds for exhaustive search pruning.

The bounder estimates the best possible score that can be achieved from a partial solution state. If this optimistic bound is worse than the best complete solution found so far, the branch can be pruned.

Required Methods§

Source

fn calculate_optimistic_bound(&self, score_director: &D) -> Option<S::Score>

Provided Methods§

Source

fn calculate_pessimistic_bound(&self, score_director: &D) -> Option<S::Score>

Implementations on Foreign Types§

Source§

impl<S: PlanningSolution, D: Director<S>> ScoreBounder<S, D> for ()

Source§

fn calculate_optimistic_bound(&self, _score_director: &D) -> Option<S::Score>

Implementors§

Source§

impl<S: PlanningSolution, D: Director<S>> ScoreBounder<S, D> for FixedOffsetBounder<S>
where S::Score: Clone + Add<Output = S::Score> + Mul<i32, Output = S::Score>,

Source§

impl<S: PlanningSolution, D: Director<S>> ScoreBounder<S, D> for SoftScoreBounder