fuzzy_expert/terms.rs
1pub use fixed_map::key::Key as Term;
2pub use fixed_map::Key;
3use fixed_map::Map as FixedMap;
4
5#[derive(Default)]
6pub struct Terms<'t, K: Term>(pub(crate) FixedMap<K, &'t [(f64, f64)]>);
7
8impl<'t, K: Term> Terms<'t, K> {
9 pub fn new() -> Self {
10 Self(FixedMap::new())
11 }
12
13 pub fn insert(&mut self, key: K, value: &'t [(f64, f64)]) {
14 self.0.insert(key, value);
15 }
16}