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
41
42
43
44
45
46
47
use AlmostEqual;
use NdFloat;
use ;
use ;
/// Floating-point element types `f32` and `f64`.
///
/// Trait `Real` is only implemented for `f32` and `f64`, including the traits
/// needed for computing smoothing splines, manipulating n-d arrays and sparse matrices and also
/// checking almost equality.
///
/// This trait can only be implemented by `f32` and `f64`.
// fn test<T>(
// a: &CsMatBase<T, usize, Vec<usize>, Vec<usize>, Vec<T>, usize>,
// b: &CsMatBase<T, usize, Vec<usize>, Vec<usize>, Vec<T>, usize>,
// ) where
// T: Real<T>,
// // for<'r> &'r T: Add<&'r T, Output = T>,
// for<'r> &'r T: RealRef<&'r T, T>
// {
// let c = a + b;
// }
// fn test2(
// a: &CsMatBase<f64, usize, Vec<usize>, Vec<usize>, Vec<f64>, usize>,
// b: &CsMatBase<f64, usize, Vec<usize>, Vec<usize>, Vec<f64>, usize>,
// ) {
// let c = a + b;
// }