Skip to main content

encode_quality_metrics

Function encode_quality_metrics 

Source
pub fn encode_quality_metrics(
    coords: ArrayView2<'_, f64>,
    certified: &[bool],
    coords_ref: ArrayView2<'_, f64>,
    certified_ref: &[bool],
    reconstruction: ArrayView2<'_, f64>,
    targets: ArrayView2<'_, f64>,
) -> EncodeQualityMetrics
Expand description

Compute EncodeQualityMetrics for an encode result.

  • coords / certified — the encode UNDER TEST (n×d coords, n flags).
  • coords_ref / certified_ref — the production per-row reference encode (the definition of truth the batched/accelerated encode must match).
  • reconstruction — the decoded reconstruction implied by coords (n×p, i.e. amplitudeᵢ · Φ(coordsᵢ) · B).
  • targets — the encode inputs x (n×p).

Panics on a shape mismatch: this is a benchmark/correctness helper and a mismatched comparison would silently launder a wrong number.