Module qwt::perf_and_test_utils
source · Expand description
The module provides utilities to perform tests and performance evaluations of different data structures.
In particular, it provides functions to generate random increasing sequences and random queries, to measure rank and select queries, and so on.
Structs
Functions
- Generates a random vector of
n_queries
values in [0,range_size
]. This can be used to generate random queries. - Generates a random vector of
n_queries
. Each query is a pair: a value in [0,range_size
] and a symbol in [0,sigma
]. This can be used to generate random queries for rank over a general alphabet of sizesigma
. - Generates a random vector of
n_queries
forrank
queries on a given sequences
. Each query is a pair: a random position in [0,s.len()
) and the symbols[pos]
, wherepos
is another random position in [0,s.len()
). - Generate a random vector of
n_queries
forselect
queries on a given sequences
. 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]]
, whereoccs[c]
is the number of occurrences ofc
. - Generates a random sequence of length
n
over the alphabet [0,sigma
]. - Generates a random strictly increasing sequence of
n
values up tou
. - Given a strictly increasing vector v, it returns a vector with all the values not in v.
- Returns the type name of its argument.