pub trait ScoreSetTrait32<C> {
// Required methods
fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32;
fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>;
}Expand description
Trait implemented by tuples of Metric32s for weighted evaluation.
Per-arity impls are generated by xtask into gen_score_set32.rs.
Required Methods§
Sourcefn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32
fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32
Compute the weighted sum of all metric scores.
Sourcefn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>
fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>
Collect per-metric Breakdown32 rows.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32, F4: Fn(&C) -> f32, F5: Fn(&C) -> f32, F6: Fn(&C) -> f32, F7: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>, Metric32<C, F4>, Metric32<C, F5>, Metric32<C, F6>, Metric32<C, F7>)
impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32, F4: Fn(&C) -> f32, F5: Fn(&C) -> f32, F6: Fn(&C) -> f32, F7: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>, Metric32<C, F4>, Metric32<C, F5>, Metric32<C, F6>, Metric32<C, F7>)
fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32
fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>
Source§impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32, F4: Fn(&C) -> f32, F5: Fn(&C) -> f32, F6: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>, Metric32<C, F4>, Metric32<C, F5>, Metric32<C, F6>)
impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32, F4: Fn(&C) -> f32, F5: Fn(&C) -> f32, F6: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>, Metric32<C, F4>, Metric32<C, F5>, Metric32<C, F6>)
fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32
fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>
Source§impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32, F4: Fn(&C) -> f32, F5: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>, Metric32<C, F4>, Metric32<C, F5>)
impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32, F4: Fn(&C) -> f32, F5: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>, Metric32<C, F4>, Metric32<C, F5>)
fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32
fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>
Source§impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32, F4: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>, Metric32<C, F4>)
impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32, F4: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>, Metric32<C, F4>)
fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32
fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>
Source§impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>)
impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32, F3: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>, Metric32<C, F3>)
fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32
fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>
Source§impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>)
impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32, F2: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>, Metric32<C, F2>)
fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32
fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>
Source§impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>)
impl<C, F0: Fn(&C) -> f32, F1: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>, Metric32<C, F1>)
fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32
fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>
Source§impl<C, F0: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>,)
Available on crate feature fixed-tuple-1 only.
impl<C, F0: Fn(&C) -> f32> ScoreSetTrait32<C> for (Metric32<C, F0>,)
Available on crate feature
fixed-tuple-1 only.