MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / normalization_check

Function normalization_check

nodedb-codec/src/spherical.rs:322–328  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

320
321 #[test]
322 fn normalization_check() {
323 let normalized = make_normalized_vectors(100, 32);
324 assert!(normalization_ratio(&normalized, 32) > 0.95);
325
326 let raw: Vec<f32> = (0..3200).map(|i| i as f32).collect();
327 assert!(normalization_ratio(&raw, 32) < 0.1);
328 }
329
330 #[test]
331 fn truncated_error() {

Callers

nothing calls this directly

Calls 2

make_normalized_vectorsFunction · 0.85
collectMethod · 0.80

Tested by

no test coverage detected