pub struct RandomTeleport<T: Float + SampleUniform> { /* private fields */ }Expand description
The struct to move particle to random position with given probability
Implementations§
Source§impl<T: Float + SampleUniform> RandomTeleport<T>
impl<T: Float + SampleUniform> RandomTeleport<T>
Sourcepub fn new(intervals: Vec<(T, T)>, probability: f32) -> Self
pub fn new(intervals: Vec<(T, T)>, probability: f32) -> Self
Constructor.
§Parameters
intervals - intervals - vector of tuples. Size of the vector must be equal to dimension. The first value in tuple is minimum coordinate, the second value is maximum coordinate.
probability - probability of particle teleportation. Must be in the range [0, 1].
Trait Implementations§
Source§impl<T: Float + SampleUniform> PostMove<T> for RandomTeleport<T>
impl<T: Float + SampleUniform> PostMove<T> for RandomTeleport<T>
Auto Trait Implementations§
impl<T> Freeze for RandomTeleport<T>
impl<T> RefUnwindSafe for RandomTeleport<T>
impl<T> !Send for RandomTeleport<T>
impl<T> !Sync for RandomTeleport<T>
impl<T> Unpin for RandomTeleport<T>
impl<T> UnsafeUnpin for RandomTeleport<T>
impl<T> UnwindSafe for RandomTeleport<T>
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