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

Function var_all_v2

src/statistics/mod.rs:294–307  ·  view source on GitHub ↗

Compute Variance of all elements # Parameters - `input` is the input Array - `bias_kind` of type [VarianceBias][1] denotes the type of variane to be computed # Return Values A tuple of 64-bit floating point values that has the variance of `input` Array. [1]: ./enum.VarianceBias.html

(input: &Array<T>, bias_kind: VarianceBias)

Source from the content-addressed store, hash-verified

292///
293/// [1]: ./enum.VarianceBias.html
294pub fn var_all_v2<T: HasAfEnum>(input: &Array<T>, bias_kind: VarianceBias) -> (f64, f64) {
295 let mut real: f64 = 0.0;
296 let mut imag: f64 = 0.0;
297 unsafe {
298 let err_val = af_var_all_v2(
299 &mut real as *mut c_double,
300 &mut imag as *mut c_double,
301 input.get(),
302 bias_kind as c_uint,
303 );
304 HANDLE_ERROR(AfError::from(err_val));
305 }
306 (real, imag)
307}
308
309/// Compute Variance of all elements
310///

Callers 1

var_allFunction · 0.85

Calls 2

HANDLE_ERRORFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected