pub fn split_vector_randomly<T>(
vec: &[T],
x: usize,
seed: u64,
) -> (Vec<T>, Vec<T>)where
T: Clone,Expand description
Split a vector randomly into two chunks
Splits a vector randomly into two of [..x] and the other [x..]
§Params
vec- Slice of the vector you want to splitx- Length of the first vector; the rest will be put into the second vectorseed- Seed for reproducibility
§Returns
A tuple of the pieces of the vector