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

Function f64_batch_roundtrip

nodedb-codec/src/gorilla.rs:431–439  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

429
430 #[test]
431 fn f64_batch_roundtrip() {
432 let values: Vec<f64> = (0..500).map(|i| 42.0 + i as f64 * 0.1).collect();
433 let encoded = encode_f64(&values);
434 let decoded = decode_f64(&encoded).unwrap();
435 assert_eq!(values.len(), decoded.len());
436 for (a, b) in values.iter().zip(decoded.iter()) {
437 assert_eq!(a.to_bits(), b.to_bits());
438 }
439 }
440
441 #[test]
442 fn timestamp_batch_roundtrip() {

Callers

nothing calls this directly

Calls 4

collectMethod · 0.80
encode_f64Function · 0.70
decode_f64Function · 0.70
iterMethod · 0.45

Tested by

no test coverage detected