Compute covariance of two Arrays # Parameters - `x` is the first Array - `y` is the second Array - `bias_kind` of type [VarianceBias][1] denotes the type of variane to be computed # Return Values An Array with Covariance values [1]: ./enum.VarianceBias.html
(x: &Array<T>, y: &Array<T>, bias_kind: VarianceBias)
| 234 | /// |
| 235 | /// [1]: ./enum.VarianceBias.html |
| 236 | pub fn cov_v2<T>(x: &Array<T>, y: &Array<T>, bias_kind: VarianceBias) -> Array<T::MeanOutType> |
| 237 | where |
| 238 | T: HasAfEnum + CovarianceComputable, |
| 239 | T::MeanOutType: HasAfEnum, |
| 240 | { |
| 241 | unsafe { |
| 242 | let mut temp: af_array = std::ptr::null_mut(); |
| 243 | let err_val = af_cov_v2( |
| 244 | &mut temp as *mut af_array, |
| 245 | x.get(), |
| 246 | y.get(), |
| 247 | bias_kind as c_uint, |
| 248 | ); |
| 249 | HANDLE_ERROR(AfError::from(err_val)); |
| 250 | temp.into() |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | /// Compute covariance of two Arrays |
| 255 | /// |
no test coverage detected