Update dependencies
This commit is contained in:
parent
5a6fb296a4
commit
dc2d21bea9
@ -38,7 +38,7 @@ version = "0.3"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bencher = "0.1"
|
bencher = "0.1"
|
||||||
rand = "0.5"
|
rand = "0.6"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
streaming-stats = "0.2"
|
streaming-stats = "0.2"
|
||||||
quantiles = "0.7"
|
quantiles = "0.7"
|
||||||
|
@ -8,10 +8,11 @@ extern crate stats;
|
|||||||
/// Create a random vector by sampling from a normal distribution.
|
/// Create a random vector by sampling from a normal distribution.
|
||||||
fn initialize_vec(size: usize) -> Vec<f64> {
|
fn initialize_vec(size: usize) -> Vec<f64> {
|
||||||
use rand::distributions::{Normal, Distribution};
|
use rand::distributions::{Normal, Distribution};
|
||||||
use rand::{XorShiftRng, SeedableRng};
|
use rand::SeedableRng;
|
||||||
|
use rand::rngs::SmallRng;
|
||||||
let normal = Normal::new(2.0, 3.0);
|
let normal = Normal::new(2.0, 3.0);
|
||||||
let mut values = Vec::with_capacity(size);
|
let mut values = Vec::with_capacity(size);
|
||||||
let mut rng = XorShiftRng::from_seed(
|
let mut rng = SmallRng::from_seed(
|
||||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
|
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
|
||||||
for _ in 0..size {
|
for _ in 0..size {
|
||||||
values.push(normal.sample(&mut rng));
|
values.push(normal.sample(&mut rng));
|
||||||
|
Loading…
Reference in New Issue
Block a user