Skip to main content

CostModel

Trait CostModel 

Source
pub trait CostModel {
    // Required method
    fn cost(&self, a: &Step, b: &Step) -> f64;
}
Expand description

A step-vs-step alignment cost in [0, 1]: 0.0 = identical content, 1.0 = nothing in common. Implementations must be deterministic and symmetric — the aligner’s output is part of the reproducibility promise, and the fork rule’s tau thresholds compare against these values directly.

Required Methods§

Source

fn cost(&self, a: &Step, b: &Step) -> f64

Cost of aligning a with b.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§