Compute correlation coefficient # Parameters - `x` is the first Array - `y` isthe second Array # Return Values A tuple of 64-bit floating point values with the coefficients.
(x: &Array<T>, y: &Array<T>)
| 437 | /// # Return Values |
| 438 | /// A tuple of 64-bit floating point values with the coefficients. |
| 439 | pub fn corrcoef<T>(x: &Array<T>, y: &Array<T>) -> (f64, f64) |
| 440 | where |
| 441 | T: HasAfEnum + RealNumber, |
| 442 | { |
| 443 | let mut real: f64 = 0.0; |
| 444 | let mut imag: f64 = 0.0; |
| 445 | unsafe { |
| 446 | let err_val = af_corrcoef( |
| 447 | &mut real as *mut c_double, |
| 448 | &mut imag as *mut c_double, |
| 449 | x.get(), |
| 450 | y.get(), |
| 451 | ); |
| 452 | HANDLE_ERROR(AfError::from(err_val)); |
| 453 | } |
| 454 | (real, imag) |
| 455 | } |
| 456 | |
| 457 | /// Find top k elements along a given dimension |
| 458 | /// |
nothing calls this directly
no test coverage detected