Skip to main content

Metric

Trait Metric 

Source
pub trait Metric {
    type Output: Evaluation;

    // Required methods
    fn id(&self) -> MetricId;
    fn evaluate(
        &mut self,
        reference: &PixelView<'_>,
        candidate: &PixelView<'_>,
        opts: EvalOpts<'_>,
    ) -> MetricResult<Self::Output>;
}
Expand description

Configured full-reference metric over actual strided, colour-described inputs. Reject unsupported precision, alpha and HDR interpretation explicitly.

Required Associated Types§

Source

type Output: Evaluation

Native structured assessment; no mandatory erasure or boxing.

Required Methods§

Source

fn id(&self) -> MetricId

Effective scoring configuration and actual implementation provenance.

Source

fn evaluate( &mut self, reference: &PixelView<'_>, candidate: &PixelView<'_>, opts: EvalOpts<'_>, ) -> MetricResult<Self::Output>

Native comparison. Poll controls and join owned workers before return. Use score for admission and returned-score checks.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<M: Metric + ?Sized> Metric for Box<M>

Source§

type Output = <M as Metric>::Output

Source§

fn id(&self) -> MetricId

Source§

fn evaluate( &mut self, r: &PixelView<'_>, d: &PixelView<'_>, opts: EvalOpts<'_>, ) -> MetricResult<Self::Output>

Implementors§