Struct rustfst::algorithms::randgen::RandGenConfig
source · pub struct RandGenConfig<S: TrSelector> {
pub selector: S,
pub max_length: usize,
pub npath: usize,
pub weighted: bool,
pub remove_total_weight: bool,
}
Expand description
Configuration struct for random path generation.
Fields§
§selector: S
How an arc is selected at a state.
max_length: usize
Maximum path length.
npath: usize
Number of paths to generate.
weighted: bool
Is the output tree weighted by path count, or is it just an unweighted DAG?
remove_total_weight: bool
Remove total weight when output is weighted?
Implementations§
source§impl<S: TrSelector> RandGenConfig<S>
impl<S: TrSelector> RandGenConfig<S>
pub fn new(selector: S) -> Self
pub fn with_max_length(self, max_length: usize) -> Self
pub fn with_npath(self, npath: usize) -> Self
pub fn with_weighted(self, weighted: bool) -> Self
pub fn with_remove_total_weight(self, remove_total_weight: bool) -> Self
Auto Trait Implementations§
impl<S> Freeze for RandGenConfig<S>where
S: Freeze,
impl<S> RefUnwindSafe for RandGenConfig<S>where
S: RefUnwindSafe,
impl<S> Send for RandGenConfig<S>where
S: Send,
impl<S> Sync for RandGenConfig<S>where
S: Sync,
impl<S> Unpin for RandGenConfig<S>where
S: Unpin,
impl<S> UnwindSafe for RandGenConfig<S>where
S: UnwindSafe,
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more