use crate::matrix::FdMatrix;
use crate::streaming_depth::{SortedReferenceState, StreamingDepth, StreamingFraimanMuniz};
#[must_use = "expensive computation whose result should not be discarded"]
pub fn fraiman_muniz_1d(data_obj: &FdMatrix, data_ori: &FdMatrix, scale: bool) -> Vec<f64> {
if data_obj.nrows() == 0 || data_ori.nrows() == 0 || data_obj.ncols() == 0 {
return Vec::new();
}
let state = SortedReferenceState::from_reference(data_ori);
let streaming = StreamingFraimanMuniz::new(state, scale);
streaming.depth_batch(data_obj)
}
#[must_use = "expensive computation whose result should not be discarded"]
pub fn fraiman_muniz_2d(data_obj: &FdMatrix, data_ori: &FdMatrix, scale: bool) -> Vec<f64> {
fraiman_muniz_1d(data_obj, data_ori, scale)
}