Fix MatrixMN::from_distribution (#463)

This commit is contained in:
Antony Lesage 2018-11-06 19:24:20 +01:00 committed by Sébastien Crozet
parent 2ff394e729
commit c370564dba
1 changed files with 3 additions and 3 deletions

View File

@ -251,7 +251,7 @@ where DefaultAllocator: Allocator<N, R, C>
pub fn from_distribution_generic<Distr: Distribution<N> + ?Sized, G: Rng + ?Sized>( pub fn from_distribution_generic<Distr: Distribution<N> + ?Sized, G: Rng + ?Sized>(
nrows: R, nrows: R,
ncols: C, ncols: C,
distribution: &mut Distr, distribution: &Distr,
rng: &mut G, rng: &mut G,
) -> Self ) -> Self
{ {
@ -584,7 +584,7 @@ macro_rules! impl_constructors(
#[inline] #[inline]
pub fn from_distribution<Distr: Distribution<N> + ?Sized, G: Rng + ?Sized>( pub fn from_distribution<Distr: Distribution<N> + ?Sized, G: Rng + ?Sized>(
$($args: usize,)* $($args: usize,)*
distribution: &mut Distr, distribution: &Distr,
rng: &mut G, rng: &mut G,
) -> Self { ) -> Self {
Self::from_distribution_generic($($gargs, )* distribution, rng) Self::from_distribution_generic($($gargs, )* distribution, rng)
@ -721,7 +721,7 @@ where
Unit::new_normalize(VectorN::from_distribution_generic( Unit::new_normalize(VectorN::from_distribution_generic(
D::name(), D::name(),
U1, U1,
&mut StandardNormal, &StandardNormal,
rng, rng,
)) ))
} }