khive_score/lib.rs
1//! Cross-platform deterministic scoring.
2//!
3//! `DeterministicScore` converts f64 to fixed-point i64 (2^32 scale) for
4//! identical ranking across x86_64, ARM64, and WASM.
5//!
6//! Vector similarity (dot product, cosine) is not in this crate — it belongs
7//! with the embedding implementation (lattice).
8
9mod comparator;
10mod ops;
11mod quantkey;
12mod score;
13
14pub use comparator::{cmp_asc_then_id, cmp_desc_then_id, Ranked};
15pub use ops::{
16 avg_scores, avg_scores_checked, max_score, min_score, rrf_score, sum_scores, weighted_sum,
17 ScoreError,
18};
19pub use quantkey::QuantKey;
20pub use score::DeterministicScore;