pub struct Markov { /* private fields */ }
Implementations§
source§impl Markov
impl Markov
pub fn print(&self)
sourcepub fn generate(&self, ws: &mut WorkingSet, rng: &mut impl Rng)
pub fn generate(&self, ws: &mut WorkingSet, rng: &mut impl Rng)
Generate a name. You need to provide your own WorkingSet and Rng, which is necessary to save on allocations. A dependent application should use the full name generator interface instead
sourcepub fn learn(&mut self, sample_set: &SampleSet) -> Result<(), LearnError>
pub fn learn(&mut self, sample_set: &SampleSet) -> Result<(), LearnError>
Learn learns samples from the sample set. The former state is copied and will be restored upon one of the samples failing to import.
sourcepub fn learn_one(&mut self, sample: &Sample) -> Result<(), LearnError>
pub fn learn_one(&mut self, sample: &Sample) -> Result<(), LearnError>
Learn rules from the sample. The generation is heavily optimized for speed, but learn
is
paying for that speed.
pub fn recalculate_weights(&mut self)
pub fn validate(&self) -> Result<(), ValidationError>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Markov
impl Send for Markov
impl Sync for Markov
impl Unpin for Markov
impl UnwindSafe for Markov
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