pub struct PathInit<'a, const N: usize, SB, WS, TFit>{ /* private fields */ }Implementations§
Source§impl<'a, const N: usize, SB, WS, TFit> PathInit<'a, N, SB, WS, TFit>
impl<'a, const N: usize, SB, WS, TFit> PathInit<'a, N, SB, WS, TFit>
pub fn new( bounds: &'a RouteBounds, boat: &'a SB, wind_source: &'a WS, fit_calc: &'a TFit, particle_count: usize, init_shares: InitShares, baseline_shares: BaselineShares, ) -> Self
Sourcepub fn init_with_partition<R: Rng>(
&self,
rng: &mut R,
) -> (Group<Path<N>>, Vec<Range<usize>>)
pub fn init_with_partition<R: Rng>( &self, rng: &mut R, ) -> (Group<Path<N>>, Vec<Range<usize>>)
Same as ParticleInit::init plus a per-baseline partition
for the niched topology — one Range per cohort in the order
the internal baseline-computation routine emits, empty cohorts
absent. RNG draws match init so the same seed produces the
identical layout.
Trait Implementations§
Source§impl<const N: usize, SB, WS, TFit> ParticleInit for PathInit<'_, N, SB, WS, TFit>
impl<const N: usize, SB, WS, TFit> ParticleInit for PathInit<'_, N, SB, WS, TFit>
Auto Trait Implementations§
impl<'a, const N: usize, SB, WS, TFit> Freeze for PathInit<'a, N, SB, WS, TFit>
impl<'a, const N: usize, SB, WS, TFit> RefUnwindSafe for PathInit<'a, N, SB, WS, TFit>
impl<'a, const N: usize, SB, WS, TFit> Send for PathInit<'a, N, SB, WS, TFit>
impl<'a, const N: usize, SB, WS, TFit> Sync for PathInit<'a, N, SB, WS, TFit>
impl<'a, const N: usize, SB, WS, TFit> Unpin for PathInit<'a, N, SB, WS, TFit>
impl<'a, const N: usize, SB, WS, TFit> UnsafeUnpin for PathInit<'a, N, SB, WS, TFit>
impl<'a, const N: usize, SB, WS, TFit> UnwindSafe for PathInit<'a, N, SB, WS, TFit>
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