fdars_core/depth/
random_tukey.rs1use crate::matrix::FdMatrix;
4
5use super::random_depth_core;
6
7#[must_use = "expensive computation whose result should not be discarded"]
11pub fn random_tukey_1d(data_obj: &FdMatrix, data_ori: &FdMatrix, nproj: usize) -> Vec<f64> {
12 random_tukey_1d_seeded(data_obj, data_ori, nproj, None)
13}
14
15#[must_use = "expensive computation whose result should not be discarded"]
17pub fn random_tukey_1d_seeded(
18 data_obj: &FdMatrix,
19 data_ori: &FdMatrix,
20 nproj: usize,
21 seed: Option<u64>,
22) -> Vec<f64> {
23 random_depth_core(
24 data_obj,
25 data_ori,
26 nproj,
27 seed,
28 f64::INFINITY,
29 f64::min,
30 |acc, _| acc,
31 )
32}
33
34#[must_use = "expensive computation whose result should not be discarded"]
36pub fn random_tukey_2d(data_obj: &FdMatrix, data_ori: &FdMatrix, nproj: usize) -> Vec<f64> {
37 random_tukey_1d(data_obj, data_ori, nproj)
38}