pub trait ChainLengthDistribution {
// Required methods
fn sample(
&self,
mn: f64,
pdi: f64,
m0: f64,
num_chains: usize,
rng: &mut dyn RngCore,
) -> Vec<usize>;
fn name(&self) -> &'static str;
}Expand description
A distribution that can sample chain lengths (as repeat-unit counts).
Required Methods§
Sourcefn sample(
&self,
mn: f64,
pdi: f64,
m0: f64,
num_chains: usize,
rng: &mut dyn RngCore,
) -> Vec<usize>
fn sample( &self, mn: f64, pdi: f64, m0: f64, num_chains: usize, rng: &mut dyn RngCore, ) -> Vec<usize>
Sample num_chains chain lengths (each ≥ 1).
mn— target number-average molecular weight (g/mol).pdi— target polydispersity index (Mw/Mn, ≥ 1.0).m0— molar mass of a single repeat unit (g/mol).rng— random number generator (pass a seeded RNG for reproducibility).