Deterministic LCG step for reproducible randomness across train calls.
(s: &mut u64)
| 39 | |
| 40 | /// Deterministic LCG step for reproducible randomness across train calls. |
| 41 | fn lcg_next(s: &mut u64) -> u64 { |
| 42 | *s = s |
| 43 | .wrapping_mul(6364136223846793005) |
| 44 | .wrapping_add(1442695040888963407); |
| 45 | *s |
| 46 | } |
| 47 | |
| 48 | /// Distance from `v` to the nearest centroid in `centroids`. |
| 49 | fn min_dist_to_centroids(v: &[f32], centroids: &[Vec<f32>]) -> f32 { |
no outgoing calls
no test coverage detected