Expand description
Cross-platform deterministic scoring.
DeterministicScore converts f64 to fixed-point i64 (2^32 scale) for
identical ranking across x86_64, ARM64, and WASM.
score_from_distance is the canonical distance-to-similarity conversion
used by all vector retrieval back-ends (HNSW, flat-scan, …).
Re-exports§
pub use distance::score_from_distance;
Modules§
- distance
- Canonical distance-to-similarity conversion (ADR-006 boundary).
Structs§
- Deterministic
Score - Ranked
- Ranked item: score descending, ID ascending for ties.
Enums§
Functions§
- avg_
scores - avg_
scores_ checked - cmp_
asc_ then_ id - Compare scores ascending, lower ID wins ties.
- cmp_
desc_ then_ id - Compare scores descending, lower ID wins ties.
- max_
score - min_
score - rrf_
score - Reciprocal Rank Fusion score:
1 / (k + rank). - sum_
scores - weighted_
sum