github
4 of 131 new or added lines in 4 files covered. (3.05%)
20 existing lines in 5 files now uncovered.73014 of 82024 relevant lines covered (89.02%)
384847.63 hits per line
1 |
use crate::xx_decompose::utilities::Square; |
|
2 |
|
|
3 |
struct Point {
|
|
4 |
a: f64,
|
|
5 |
b: f64, |
|
6 |
c: f64, |
|
7 |
} |
|
8 |
|
|
9 |
/// Computes the infidelity distance between two points p, q expressed in positive canonical
|
|
10 |
/// coordinates.
|
|
NEW
|
fn _average_infidelity(p: Point, q: Point) -> f64 { |
× |
NEW
|
let Point { |
× |
NEW
|
a: a0,
|
× |
NEW
|
b: b0, |
× |
NEW
|
c: c0, |
× |
NEW
|
} = p; |
× |
NEW
|
let Point { |
× |
NEW
|
a: a1,
|
× |
NEW
|
b: b1, |
× |
NEW
|
c: c1, |
× |
NEW
|
} = q; |
× |
NEW
|
|
× |
NEW
|
1. - 1. / 20. |
× |
NEW
|
* (4.
|
× |
NEW
|
+ 16. |
× |
NEW
|
* ((a0 - a1).cos().sq() * (b0 - b1).cos().sq() * (c0 - c1).cos().sq() |
× |
NEW
|
+ (a0 - a1).sin().sq() * (b0 - b1).sin().sq() * (c0 - c1).sin().sq())) |
× |
NEW
|
} |
× |