MCPcopy Index your code
hub / github.com/douchuan/algorithm / sub

Function sub

tests/test_sparse_vec.rs:42–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41#[test]
42fn sub() {
43 let (a, b) = create();
44 let c = a - b;
45 let expect = vec![0.0, 0.0, 0.0, -0.1, -0.9, 0.0, 0.0, 0.0, 0.0, 0.75];
46 for (i, &v) in expect.iter().enumerate() {
47 assert_relative_eq!(v, c.get(i),);
48 }
49}
50
51#[test]
52fn to_string() {

Callers

nothing calls this directly

Calls 2

createFunction · 0.85
iterMethod · 0.45

Tested by

no test coverage detected