Import IsaacRng from rand_isaac instead of rand. (#678)

Import IsaacRng from rand_isaac instead of rand.
This commit is contained in:
Sébastien Crozet 2019-11-17 13:49:25 +01:00
commit 8c4bb6f1cb
5 changed files with 13 additions and 7 deletions

View File

@ -56,6 +56,7 @@ pest_derive = { version = "2.0", optional = true }
[dev-dependencies] [dev-dependencies]
serde_json = "1.0" serde_json = "1.0"
rand_xorshift = "0.2" rand_xorshift = "0.2"
rand_isaac = "0.2"
### Uncomment this line before running benchmarks. ### Uncomment this line before running benchmarks.
### We can't just let this uncommented because that would break ### We can't just let this uncommented because that would break
### compilation for #[no-std] because of the terrible Cargo bug ### compilation for #[no-std] because of the terrible Cargo bug

View File

@ -1,5 +1,6 @@
use na::{DMatrix, DVector, Matrix2, Matrix3, Matrix4, MatrixN, Vector2, Vector3, Vector4, U10}; use na::{DMatrix, DVector, Matrix2, Matrix3, Matrix4, MatrixN, Vector2, Vector3, Vector4, U10};
use rand::{IsaacRng, Rng}; use rand::Rng;
use rand_isaac::IsaacRng;
use std::ops::{Add, Div, Mul, Sub}; use std::ops::{Add, Div, Mul, Sub};
#[path = "../common/macros.rs"] #[path = "../common/macros.rs"]
@ -237,4 +238,4 @@ criterion_group!(matrix,
mat_mul_mat, mat_mul_mat,
mat100_from_fn, mat100_from_fn,
mat500_from_fn, mat500_from_fn,
); );

View File

@ -1,5 +1,6 @@
use na::{DVector, Vector2, Vector3, Vector4, VectorN}; use na::{DVector, Vector2, Vector3, Vector4, VectorN};
use rand::{IsaacRng, Rng}; use rand::Rng;
use rand_isaac::IsaacRng;
use std::ops::{Add, Div, Mul, Sub}; use std::ops::{Add, Div, Mul, Sub};
use typenum::U10000; use typenum::U10000;

View File

@ -1,5 +1,6 @@
use na::{Quaternion, UnitQuaternion, Vector3}; use na::{Quaternion, UnitQuaternion, Vector3};
use rand::{IsaacRng, Rng}; use rand::Rng;
use rand_isaac::IsaacRng;
use std::ops::{Add, Div, Mul, Sub}; use std::ops::{Add, Div, Mul, Sub};
#[path = "../common/macros.rs"] #[path = "../common/macros.rs"]
@ -34,4 +35,4 @@ criterion_group!(quaternion,
quaternion_div_s, quaternion_div_s,
quaternion_inv, quaternion_inv,
unit_quaternion_inv unit_quaternion_inv
); );

View File

@ -3,6 +3,7 @@
extern crate nalgebra as na; extern crate nalgebra as na;
extern crate rand; extern crate rand;
extern crate rand_isaac;
extern crate test; extern crate test;
extern crate typenum; extern crate typenum;
@ -10,7 +11,8 @@ extern crate typenum;
extern crate criterion; extern crate criterion;
use na::DMatrix; use na::DMatrix;
use rand::{IsaacRng, Rng}; use rand::Rng;
use rand_isaac::IsaacRng;
pub mod core; pub mod core;
pub mod geometry; pub mod geometry;
@ -36,4 +38,4 @@ criterion_main!(
linalg::solve, linalg::solve,
linalg::svd, linalg::svd,
linalg::symmetric_eigen, linalg::symmetric_eigen,
); );