Skip to content

Commit

Permalink
add docs to get_bits
Browse files Browse the repository at this point in the history
  • Loading branch information
PatStiles committed Jan 23, 2024
1 parent cb00be8 commit a5ce3b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions math/src/polynomial/sparse_multilinear_poly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ where
}
}

/// Returns the bit decomposition (Vec<bool>) of the `index` of an evaluation within the sparse multilinear polynomial.
fn get_bits(n: usize, num_bits: usize) -> Vec<bool> {
(0..num_bits)
.map(|shift_amount| ((n & (1 << (num_bits - shift_amount - 1))) > 0))
Expand Down

0 comments on commit a5ce3b0

Please sign in to comment.