github
9 of 476 new or added lines in 9 files covered. (1.89%)
432 existing lines in 21 files now uncovered.73483 of 83231 relevant lines covered (88.29%)
358693.29 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
|
} |
× |