Fix compilation errors related to rand.
This commit is contained in:
parent
6a4323d0ea
commit
be8d1ce3ce
|
@ -48,6 +48,7 @@ where
|
||||||
Owned<N, D, D>: Clone + Send,
|
Owned<N, D, D>: Clone + Send,
|
||||||
{
|
{
|
||||||
fn arbitrary<G: Gen>(g: &mut G) -> Self {
|
fn arbitrary<G: Gen>(g: &mut G) -> Self {
|
||||||
|
use rand::Rng;
|
||||||
let dim = D::try_to_usize().unwrap_or(g.gen_range(1, 50));
|
let dim = D::try_to_usize().unwrap_or(g.gen_range(1, 50));
|
||||||
Self::new(D::from_usize(dim), || N::arbitrary(g))
|
Self::new(D::from_usize(dim), || N::arbitrary(g))
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ where
|
||||||
Owned<N, D, D>: Clone + Send,
|
Owned<N, D, D>: Clone + Send,
|
||||||
{
|
{
|
||||||
fn arbitrary<G: Gen>(g: &mut G) -> Self {
|
fn arbitrary<G: Gen>(g: &mut G) -> Self {
|
||||||
|
use rand::Rng;
|
||||||
let dim = D::try_to_usize().unwrap_or(g.gen_range(1, 50));
|
let dim = D::try_to_usize().unwrap_or(g.gen_range(1, 50));
|
||||||
Self::new(D::from_usize(dim), || N::arbitrary(g))
|
Self::new(D::from_usize(dim), || N::arbitrary(g))
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,9 @@ use rand::distributions::{Distribution, OpenClosed01, Standard};
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
use alga::general::Real;
|
use alga::general::Real;
|
||||||
use base::allocator::Allocator;
|
|
||||||
use base::dimension::{U1, U2};
|
use base::dimension::{U1, U2};
|
||||||
use base::storage::Storage;
|
use base::storage::Storage;
|
||||||
use base::{DefaultAllocator, Unit, Vector};
|
use base::{Unit, Vector};
|
||||||
use geometry::{Rotation2, UnitComplex};
|
use geometry::{Rotation2, UnitComplex};
|
||||||
|
|
||||||
impl<N: Real> UnitComplex<N> {
|
impl<N: Real> UnitComplex<N> {
|
||||||
|
|
Loading…
Reference in New Issue