Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
RandomInsertion Struct Reference

Insert a random element at a random index. More...

Static Public Member Functions

template<typename T >
static void mutate (std::mt19937_64 &rng, std::vector< T > &vec, std::function< T(std::mt19937_64 &)> generate_random_element_function)
 

Detailed Description

Insert a random element at a random index.

This file contains mechanisms for deterministically mutating a given vector Types of mutations applied:

  1. Insert a random element at a random index
  2. Delete a random element at a random index
  3. Swap two random elements at random indices
  4. Mutate a random element at a random index

Definition at line 20 of file vector.cpp.

Member Function Documentation

◆ mutate()

template<typename T >
static void RandomInsertion::mutate ( std::mt19937_64 rng,
std::vector< T > &  vec,
std::function< T(std::mt19937_64 &)>  generate_random_element_function 
)
inlinestatic

Definition at line 22 of file vector.cpp.


The documentation for this struct was generated from the following file: