Initialize XorShiftRng and IsaacRng with seed
extern crate rand;
extern crate byteorder;
use byteorder::{ByteOrder, LittleEndian as LE};
use rand::{IsaacRng, XorShiftRng};
fn main() {
let mut buf = [0; 16];
{
let (mut b1, mut b2) = buf.split_at_mut(8);
byteorder::LittleEndian::write_u64(&mut b1, 123);
byteorder::LittleEndian::write_u64(&mut b2, 123);
}
let random = Rc::new(RefCell::new(XorShiftRng::from_seed(buf)));
let random = Rc::new(RefCell::new(IsaacRng::new_from_u64(123)));
}
Comments