Function storage_proofs_core::gadgets::insertion::select
source ยท pub fn select<Scalar: PrimeField, CS: ConstraintSystem<Scalar>>(
cs: CS,
from: &[AllocatedNum<Scalar>],
path_bits: &[Boolean],
) -> Result<AllocatedNum<Scalar>, SynthesisError>
Expand description
Select the nth element of from
, where path_bits
represents n, least-significant bit first.
The returned result contains the selected element, and constraints are enforced.
from.len()
must be a power of two.