Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
field.cpp File Reference

Go to the source code of this file.

Classes

struct  RandomSelection
 Randomly select a new field value. More...
 
struct  IncrementBy1
 Increment by 1. More...
 
struct  DecrementBy1
 Decrement by 1. More...
 
struct  AddRandomValue
 Add a random value. More...
 

Typedefs

using FF = bb::field< bb::Bn254FrParams >
 

Functions

FF generate_random_field (std::mt19937_64 &rng)
 
void mutate_field (bb::avm2::FF &value, std::mt19937_64 &rng, const FieldMutationConfig &config)
 

Typedef Documentation

◆ FF

This file contains mechanisms for deterministically mutating a given field (FF) and generating new random field values Types of mutations applied:

  1. Random (randomly select a new field value)
  2. Increment by 1
  3. Decrement by 1
  4. Add a random value

Definition at line 22 of file field.cpp.

Function Documentation

◆ generate_random_field()

FF generate_random_field ( std::mt19937_64 rng)

Definition at line 23 of file field.cpp.

◆ mutate_field()

void mutate_field ( bb::avm2::FF value,
std::mt19937_64 rng,
const FieldMutationConfig config 
)

Definition at line 54 of file field.cpp.