tests + force Categorizable be RealNumber

This commit is contained in:
gaxler
2021-01-30 19:31:09 -08:00
parent fd6b2e8014
commit c987d39d43
2 changed files with 114 additions and 28 deletions
+3 -1
View File
@@ -1,11 +1,13 @@
//! Traits to indicate that float variables can be viewed as categorical
//! This module assumes
use crate::math::num::RealNumber;
pub type CategoricalFloat = u16;
// pub struct CategoricalFloat(u16);
pub trait Categorizable {
pub trait Categorizable: RealNumber {
type A;
fn to_category(self) -> CategoricalFloat;