pub struct RandRng<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> { /* private fields */ }
Implementations§
source§impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> RandRng<M, G>
impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> RandRng<M, G>
pub fn into_inner(self) -> G
Trait Implementations§
source§impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Backup for RandRng<M, G>
impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Backup for RandRng<M, G>
unsafe fn backup_unchecked(&self) -> Self
fn backup(&self) -> BackedUp<Self>
source§impl<M: Clone + MathsCore, G: Clone + RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Clone for RandRng<M, G>
impl<M: Clone + MathsCore, G: Clone + RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Clone for RandRng<M, G>
source§impl<M: MathsCore, G> ComputeTypeSet for RandRng<M, G>
impl<M: MathsCore, G> ComputeTypeSet for RandRng<M, G>
§type Output<__TypeSetRest: ExpandTypeSet> = <<__TypeSetRest as ComputeSet>::Output<PhantomData<M>> as ComputeSet>::Output<G>
type Output<__TypeSetRest: ExpandTypeSet> = <<__TypeSetRest as ComputeSet>::Output<PhantomData<M>> as ComputeSet>::Output<G>
Extend the set
T
into a (larger) set containing also the types this
type links to. Read moresource§impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned + Debug> Debug for RandRng<M, G>
impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned + Debug> Debug for RandRng<M, G>
source§impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Debug for RandRng<M, G>
impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Debug for RandRng<M, G>
source§impl<'de, M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Deserialize<'de> for RandRng<M, G>
impl<'de, M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Deserialize<'de> for RandRng<M, G>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> From<G> for RandRng<M, G>
impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> From<G> for RandRng<M, G>
source§impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Send + Clone + Serialize + DeserializeOwned> RngCore<M> for RandRng<M, G>
impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Send + Clone + Serialize + DeserializeOwned> RngCore<M> for RandRng<M, G>
source§impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Serialize for RandRng<M, G>
impl<M: MathsCore, G: RandRngCore + RandSeedableRng + Clone + Serialize + DeserializeOwned> Serialize for RandRng<M, G>
source§impl<M: MathsCore, G> TypeLayout for RandRng<M, G>
impl<M: MathsCore, G> TypeLayout for RandRng<M, G>
§type Inhabited = <And<<G as TypeLayout>::Inhabited, <And<<PhantomData<M> as TypeLayout>::Inhabited, Inhabited> as ComputeInhabited>::Output> as ComputeInhabited>::Output
type Inhabited = <And<<G as TypeLayout>::Inhabited, <And<<PhantomData<M> as TypeLayout>::Inhabited, Inhabited> as ComputeInhabited>::Output> as ComputeInhabited>::Output
Marker type for whether the type is
inhabited or
uninhabited.
The associated type must be either [
inhabited::Inhabited
]
or [inhabited::Uninhabited
].source§const TYPE_LAYOUT: TypeLayoutInfo<'static> = _
const TYPE_LAYOUT: TypeLayoutInfo<'static> = _
Shallow layout of the type.
Auto Trait Implementations§
impl<M, G> Freeze for RandRng<M, G>where
G: Freeze,
impl<M, G> RefUnwindSafe for RandRng<M, G>where
G: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, G> Send for RandRng<M, G>where
G: Send,
impl<M, G> Sync for RandRng<M, G>where
G: Sync,
impl<M, G> Unpin for RandRng<M, G>
impl<M, G> UnwindSafe for RandRng<M, G>where
G: UnwindSafe,
M: UnwindSafe,
Blanket Implementations§
§impl<T> Backup for Twhere
T: Clone,
impl<T> Backup for Twhere
T: Clone,
default unsafe fn backup_unchecked(&self) -> T
default unsafe fn __contracts_impl_backup_unchecked(&self) -> T
fn backup(&self) -> BackedUp<Self>
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
§impl<T> ExtractDiscriminant for T
impl<T> ExtractDiscriminant for T
§type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
The type of the discriminant, which must satisfy the trait bounds
required by
core::mem::Discriminant
. Read more§impl<M, R> RngSampler<M> for Rwhere
M: MathsCore,
R: RngCore<M>,
impl<M, R> RngSampler<M> for Rwhere
M: MathsCore,
R: RngCore<M>,
§fn sample_uniform_closed_open(&mut self) -> ClosedOpenUnitF64
fn sample_uniform_closed_open(&mut self) -> ClosedOpenUnitF64
Samples a uniform sample within
[0.0, 1.0)
, i.e. 0.0 <= X < 1.0
§fn sample_uniform_open_closed(&mut self) -> OpenClosedUnitF64
fn sample_uniform_open_closed(&mut self) -> OpenClosedUnitF64
Samples a uniform sample within
(0.0, 1.0]
, i.e. 0.0 < X <= 1.0
fn sample_exponential(&mut self, lambda: PositiveF64) -> NonNegativeF64
fn sample_event(&mut self, probability: ClosedUnitF64) -> bool
fn sample_2d_standard_normal(&mut self) -> (f64, f64)
fn sample_2d_normal(&mut self, mu: f64, sigma: NonNegativeF64) -> (f64, f64)
§impl<M, R> SeedableRng<M> for Rwhere
M: MathsCore,
R: RngCore<M>,
impl<M, R> SeedableRng<M> for Rwhere
M: MathsCore,
R: RngCore<M>,
fn seed_from_u64(state: u64) -> Self
§impl<T> TypeGraphLayout for Twhere
T: TypeLayout + ComputeTypeSet,
impl<T> TypeGraphLayout for Twhere
T: TypeLayout + ComputeTypeSet,
§const TYPE_GRAPH: TypeLayoutGraph<'static> = _
const TYPE_GRAPH: TypeLayoutGraph<'static> = _
Shallow layout of the type.