pub struct Unit;
Expand description
Distribution that provides points uniformly distubuted on the N-dimensional sphere, where N is the number of dimensions of a specified hypercomplex number.
Trait Implementations
sourceimpl<T: Float> Distribution<Complex<T>> for Unit where
Unit: Distribution<Vector<T, 2>>,
impl<T: Float> Distribution<Complex<T>> for Unit where
Unit: Distribution<Vector<T, 2>>,
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Complex<T>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Complex<T>
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T: Float> Distribution<Quaternion<T>> for Unit where
Unit: Distribution<Vector<T, 4>>,
impl<T: Float> Distribution<Quaternion<T>> for Unit where
Unit: Distribution<Vector<T, 4>>,
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Quaternion<T>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Quaternion<T>
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T: Float, const N: usize> Distribution<Vector<T, N>> for Unit where
NonZero: Distribution<Vector<T, N>>,
impl<T: Float, const N: usize> Distribution<Vector<T, N>> for Unit where
NonZero: Distribution<Vector<T, N>>,
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Vector<T, N>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Vector<T, N>
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
Auto Trait Implementations
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnwindSafe for Unit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more