1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use ;
// These scalar-element impls treat `f64` itself as the parameter / vector
// type — used by 1-D solvers that work directly on a scalar `x: f64`.
// They are not blanketed over `F: Scalar` because that would conflict
// with the container impls (`Vec<F>`, `DVector<F>`, `Col<F>`, …): Rust
// can't rule out a future upstream `impl Scalar for Vec<...>` etc., so
// `impl<F: Scalar> NormSquared<F> for F` would collide with
// `impl<F: Scalar> NormSquared<F> for Vec<F>` under the coherence rules.
// Add `impl ... for f32` here too once a consumer needs it.