pub struct WfaLearning<F, A>where
F: Field,
F::Additive: Invertible,
F::Multiplicative: Invertible,
A: BlackBoxAutomaton<Output = F::T>,{ /* private fields */ }
Implementations§
Source§impl<F, A> WfaLearning<F, A>where
F: Field,
F::Additive: Invertible,
F::Multiplicative: Invertible,
F::T: PartialEq,
A: BlackBoxAutomaton<Output = F::T>,
impl<F, A> WfaLearning<F, A>where
F: Field,
F::Additive: Invertible,
F::Multiplicative: Invertible,
F::T: PartialEq,
A: BlackBoxAutomaton<Output = F::T>,
pub fn new(automaton: A) -> Self
pub fn wfa(&self) -> &WeightedFiniteAutomaton<F>
Sourcepub fn train_sample(&mut self, sample: &[usize]) -> bool
pub fn train_sample(&mut self, sample: &[usize]) -> bool
pub fn train(&mut self, samples: impl IntoIterator<Item = Vec<usize>>)
pub fn batch_train(&mut self, samples: impl IntoIterator<Item = Vec<usize>>)
Trait Implementations§
Source§impl<F, A> Clone for WfaLearning<F, A>where
F: Field,
F::Additive: Invertible,
F::Multiplicative: Invertible,
A: BlackBoxAutomaton<Output = F::T> + Clone,
impl<F, A> Clone for WfaLearning<F, A>where
F: Field,
F::Additive: Invertible,
F::Multiplicative: Invertible,
A: BlackBoxAutomaton<Output = F::T> + Clone,
Source§impl<F, A> Debug for WfaLearning<F, A>where
F: Field,
F::Additive: Invertible,
F::Multiplicative: Invertible,
F::T: Debug,
A: BlackBoxAutomaton<Output = F::T> + Debug,
impl<F, A> Debug for WfaLearning<F, A>where
F: Field,
F::Additive: Invertible,
F::Multiplicative: Invertible,
F::T: Debug,
A: BlackBoxAutomaton<Output = F::T> + Debug,
Auto Trait Implementations§
impl<F, A> Freeze for WfaLearning<F, A>where
A: Freeze,
impl<F, A> RefUnwindSafe for WfaLearning<F, A>
impl<F, A> Send for WfaLearning<F, A>
impl<F, A> Sync for WfaLearning<F, A>
impl<F, A> Unpin for WfaLearning<F, A>
impl<F, A> UnwindSafe for WfaLearning<F, A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more