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.
Vector similarity (dot product, cosine) is not in this crate — it belongs with the embedding implementation (lattice).
Structs§
- Deterministic
Score - Quant
Key - 8-byte packed sort key: i32 quantized score + u32 ID prefix.
- 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