Function concrete_core::math::random::random_uniform_n_msb_tensor [−][src]
pub fn random_uniform_n_msb_tensor<T: RandomGenerable<UniformMsb>>(
size: usize,
n: usize
) -> Tensor<Vec<T>>
Generates a tensor of random uniform values, whose n msbs are sampled uniformly.
Example
use concrete_core::math::tensor::Tensor; use concrete_core::math::random::random_uniform_n_msb_tensor; let t: Tensor<Vec<u64>> = random_uniform_n_msb_tensor(10, 55); assert_eq!(t.len(), 10); let first_val = t.get_element(0); for i in 1..10{ assert_ne!(first_val, t.get_element(i)); }