kitt_score 0.1.0

Decision engine at the core of Project KITT — in-memory stateful matching with pluggable scoring backends.
Documentation
//! Internal typed representation of a compiled scorer.
//!
//! An internal enum (rather than `Box<dyn Scorer>`) lets the trigger path
//! dispatch with a single match, avoiding the virtual-call overhead on the
//! hot path. The public `Scorer` trait remains, but the engine owns its own
//! sum-type to specialize per backend.

use crate::scoring::backends::predicate::bytecode::Program;
use crate::scoring::VectorMetric;

/// Owned, ready-to-execute scorer variant.
pub enum CompiledScorer {
    /// Predicate bytecode compiled from `ScorerSpec::Predicate`.
    Predicate(Program),
    /// Linear SIMD scan against an owned target vector.
    VectorLinear {
        /// Target vector the location's embedding is compared to.
        target: Box<[f32]>,
        /// Metric used for the similarity computation.
        metric: VectorMetric,
    },
}