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

Function median_all

src/statistics/mod.rs:369–384  ·  view source on GitHub ↗

Compute median of all data Parameters - `input` is the input Array Return Values A tuple of 64-bit floating point values with the median

(input: &Array<T>)

Source from the content-addressed store, hash-verified

367///
368/// A tuple of 64-bit floating point values with the median
369pub fn median_all<T>(input: &Array<T>) -> (f64, f64)
370where
371 T: HasAfEnum + MedianComputable,
372{
373 let mut real: f64 = 0.0;
374 let mut imag: f64 = 0.0;
375 unsafe {
376 let err_val = af_median_all(
377 &mut real as *mut c_double,
378 &mut imag as *mut c_double,
379 input.get(),
380 );
381 HANDLE_ERROR(AfError::from(err_val));
382 }
383 (real, imag)
384}
385
386macro_rules! stat_wtd_all_func_def {
387 ($doc_str: expr, $fn_name: ident, $ffi_fn: ident) => {

Callers

nothing calls this directly

Calls 2

HANDLE_ERRORFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected