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: SHow an arc is selected at a state.
max_length: usizeMaximum path length.
npath: usizeNumber of paths to generate.
weighted: boolIs the output tree weighted by path count, or is it just an unweighted DAG?
remove_total_weight: boolRemove 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> UnsafeUnpin for RandGenConfig<S>where
S: UnsafeUnpin,
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