Expand description
Helpful functions for manipulating MLEs (e.g. padding). Module for generating and manipulating mles.
Structs§
- Gray
Code Iterator - A struct representing an iterator that iterates through the range
(1..2^{
num_bits}) but in the ordering of a Gray Code, which means that the Hamming distance between the bit representation of any consecutive indices is only 1. - LexicographicLE
- A struct representing lexicographic bit-order in little-endian.
Functions§
- argsort
- Returns the argsort (i.e. indices) of the given vector slice.
- build_
composite_ mle - Construct a parent MLE for the given MLEs and prefix bits, where the prefix
bits of each MLE specify how it should be inserted into the parent. Entries
left unspecified are filled with
F::ZERO. - compute_
flipped_ bit_ idx_ and_ value_ graycode - Compute the single flipped bit and its previous value for the gray codes iterator.
- compute_
flipped_ bit_ idx_ and_ values_ lexicographic - Compute the flipped bits between a previous value and a current value, and return each of the flipped bits’ indices and previous value.
- compute_
inverses_ vec_ and_ one_ minus_ inverted_ vec - Compute the inverses and one minus the elem inverted for a vec of claim challenges.
- compute_
next_ beta_ value_ from_ current - Compute the next beta value from the previous by multiplying by appropriate inverses and challenge points given the flipped bits and their previous values. This is for when we have a single claim to compute the beta over.
- compute_
next_ beta_ values_ vec_ from_ current - Compute the next beta values from the previous by multiplying by appropriate inverses and challenge points given the flipped bits and their previous values. This is for when we have multiple claims to compute the beta over.
- evaluate_
mle_ at_ a_ point_ gray_ codes - This function non-destructively evaluates an MLE at a given point using the gray codes iterator. Optimized version that uses 2 multiplications instead of 1.
- evaluate_
mle_ at_ a_ point_ gray_ codes_ parallel - This function non-destructively evaluates an MLE at a given point using the gray codes iterator. Parallelized version that uses K threads.
- evaluate_
mle_ at_ a_ point_ lexicographic_ order - This function non-destructively evaluates an MLE at a given point using the LexicographicLE iterator.
- evaluate_
mle_ destructive - Destructively evaluate an MLE at a point by using the
fix_variablealgorithm iteratively until all of the variables have been bound. - get_
dummy_ random_ mle_ vec - Returns a vector of MLEs for dataparallel testing according to the number of variables and number of dataparallel bits.
- get_
mle_ idx_ decomp_ for_ idx - Returns the specific bit decomp for a given index, using
num_bitsbits. Note that this returns the decomposition in BIG ENDIAN! - get_
random_ mle - Helper function to create random MLE with specific number of vars
- get_
random_ mle_ from_ capacity - Helper function to create random MLE with specific number of vars
- get_
total_ mle_ indices - Returns the total MLE indices given a
Vec<bool>. for the prefix bits and then the number of free bits after. - pad_
with - Return a vector containing a padded version of the input data, with the
padding value at the end of the vector, such that the length is
data.len().next_power_of_two(). This is a no-op if the length is already a power of two. - verify_
claim - Verifies a claim by evaluating the MLE at the challenge point and checking that the result.