Skip to main content

ScoreSetTrait32

Trait ScoreSetTrait32 

Source
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§

Source

fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32

Compute the weighted sum of all metric scores.

Source

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>)

Source§

fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32

Source§

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>)

Source§

fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32

Source§

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>)

Source§

fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32

Source§

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>)

Source§

fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32

Source§

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>)

Source§

fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32

Source§

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>)

Source§

fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32

Source§

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>)

Source§

fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32

Source§

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.
Source§

fn weighted_sum(&self, weights: &[f32], ctx: &C) -> f32

Source§

fn collect_breakdown(&self, weights: &[f32], ctx: &C) -> Vec<Breakdown32>

Implementors§