1use argmin::core::ArgminFloat;
2use ndarray::NdFloat;
3use num_traits::float::FloatConst;
4use num_traits::FromPrimitive;
5
6pub trait Float:
9 ArgminFloat + FloatConst + NdFloat + Default + Clone + FromPrimitive + linfa::Float
10{
11 const POSITIVE_LABEL: Self;
12 const NEGATIVE_LABEL: Self;
13}
14
15impl Float for f32 {
16 const POSITIVE_LABEL: Self = 1.0;
17 const NEGATIVE_LABEL: Self = -1.0;
18}
19
20impl Float for f64 {
21 const POSITIVE_LABEL: Self = 1.0;
22 const NEGATIVE_LABEL: Self = -1.0;
23}