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 size sigma.
  • Generates a random vector of n_queries for rank queries on a given sequence s. Each query is a pair: a random position in [0, s.len()) and the symbol s[pos], where pos is another random position in [0, s.len()).
  • 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.
  • Generates a random sequence of length n over the alphabet [0, sigma].
  • Generates a random strictly increasing sequence of n values up to u.
  • Given a strictly increasing vector v, it returns a vector with all the values not in v.
  • Returns the type name of its argument.