MCPcopy Index your code
hub / github.com/arrayfire/arrayfire-rust / cov_v2

Function cov_v2

src/statistics/mod.rs:236–252  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

234///
235/// [1]: ./enum.VarianceBias.html
236pub fn cov_v2<T>(x: &Array<T>, y: &Array<T>, bias_kind: VarianceBias) -> Array<T::MeanOutType>
237where
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///

Callers 1

covFunction · 0.85

Calls 3

HANDLE_ERRORFunction · 0.85
intoMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected