surface_ai/classifier.rs
1pub trait Classifier<T, C> {
2 // returns true if training was successful
3 fn train(&mut self, data: &[T], expect: &[C]) -> bool;
4 fn classify(&self, datum: &T) -> C;
5}
6
7pub trait Resettable {
8 // should return the calling value to its
9 // "just initialised" state
10 // returns true if the reset was successful
11 fn reset(&mut self) -> bool;
12}