pub struct WeightedRandomSelector;Trait Implementations§
Source§impl MarkovSelector for WeightedRandomSelector
impl MarkovSelector for WeightedRandomSelector
Source§fn reset(&mut self, _dir: MarkovTraverseDir)
fn reset(&mut self, _dir: MarkovTraverseDir)
Reset the state of this MarkovSelector. Read more
Source§fn weight<'a>(
&mut self,
_from: &MarkovToken<'a>,
_to: &MarkovToken<'a>,
_punct: &MarkovToken<'a>,
hits: usize,
) -> f32
fn weight<'a>( &mut self, _from: &MarkovToken<'a>, _to: &MarkovToken<'a>, _punct: &MarkovToken<'a>, hits: usize, ) -> f32
The weight of a particular link. Read more
Source§fn selection_type(&mut self) -> SelectionType
fn selection_type(&mut self) -> SelectionType
Returns the SelectionType of this Selector; this will decide how the
weight returned by Self::weight() should be interpreted.
Auto Trait Implementations§
impl Freeze for WeightedRandomSelector
impl RefUnwindSafe for WeightedRandomSelector
impl Send for WeightedRandomSelector
impl Sync for WeightedRandomSelector
impl Unpin for WeightedRandomSelector
impl UnwindSafe for WeightedRandomSelector
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