Function qwt::perf_and_test_utils::gen_select_queries
source · pub fn gen_select_queries<T: Unsigned + Into<usize> + Copy>(
n_queries: usize,
s: &[T]
) -> Vec<(usize, T)>
Expand description
Generate a random vector of n_queries
for select
queries on a given sequence s
.
A query is generated by selecting a symbol c at random from the text and, then,
by selecting a random value in [1, occs[c]]
, where occs[c]
is the number of occurrences of c
.