1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Numeric helpers for the association-rule base block: `as`-free count widening.
//!
//! Kept separate from the mining API so `mod.rs` stays inside the project's
//! 500-line `style.rs` cap. Supports, confidences, and lifts are exact rational
//! ratios of integer transaction counts, so the only numeric primitive needed here
//! is a lossless `usize → f64` widening for the ratio denominators.
/// Widens a `usize` count to `f64` without an `as` cast.
///
/// Transaction and itemset counts here are far below `2^53`, so splitting into
/// 32-bit halves and recombining reproduces the value exactly while satisfying the
/// `style.rs` no-`as` guard.
///
/// # Arguments
///
/// * `n` — the count to widen.
///
/// # Returns
///
/// `n` as an `f64` (exact for the counts this crate handles).
pub