example using complex numbers
(x: ArrayViewD<'_, Complex64>)
| 33 | |
| 34 | // example using complex numbers |
| 35 | fn conj(x: ArrayViewD<'_, Complex64>) -> ArrayD<Complex64> { |
| 36 | x.map(|c| c.conj()) |
| 37 | } |
| 38 | |
| 39 | // example using generics |
| 40 | fn generic_add<T: Copy + Add<Output = T>>( |