pub fn from_limbs(limbs: Vec<Num<E>>, limb_width: usize) -> Self {
        let limb_values = limbs
            .iter()
            .map(|n| n.value)
            .collect::<Option<Vec<E::Fr>>>();
        let value = limb_values
            .as_ref()
            .map(|values| limbs_to_nat::<E::Fr, _, _>(values.iter(), limb_width));
        let max_word = int_with_n_ones(limb_width);
        Self {
            params: BigNatParams {
                min_bits: 0,
                n_limbs: limbs.len(),
                max_word,
                limb_width,
            },
            value,
            limb_values,
            limbs: limbs
                .into_iter()
                .map(|i| LinearCombination::zero() + &i.num)
                .collect(),
        }
    }
/// Creates a `BigNat` in the circuit from the given limbs.
Creates a `BigNat` in the circuit from the given limbs.
Creates a ` BigNat ` in the circuit from the given limbs .
pub fn from_limbs(limbs: Vec<Num<E>>, limb_width: usize) -> Self {
        let limb_values = limbs
            .iter()
            .map(|n| n.value)
            .collect::<Option<Vec<E::Fr>>>();
        let value = limb_values
            .as_ref()
            .map(|values| limbs_to_nat::<E::Fr, _, _>(values.iter(), limb_width));
        let max_word = int_with_n_ones(limb_width);
        Self {
            params: BigNatParams {
                min_bits: 0,
                n_limbs: limbs.len(),
                max_word,
                limb_width,
            },
            value,
            limb_values,
            limbs: limbs
                .into_iter()
                .map(|i| LinearCombination::zero() + &i.num)
                .collect(),
        }
    }
pub fn from_limbs ( limbs : Vec < Num < E > > , limb_width : usize ) -> Self { let limb_values = limbs . iter ( ) . map ( | n | n . value ) . collect :: < Option < Vec < E :: Fr > > > ( ) ; let value = limb_values . as_ref ( ) . map ( | values | limbs_to_nat :: < E :: Fr , _ , _ > ( values . iter ( ) , limb_width ) ) ; let max_word = int_with_n_ones ( limb_width ) ; Self { params : BigNatParams { min_bits : 0 , n_limbs : limbs . len ( ) , max_word , limb_width , } , value , limb_values , limbs : limbs . into_iter ( ) . map ( | i | LinearCombination :: zero ( ) + & i . num ) . collect ( ) , } }
Creates a `BigNat` in the circuit from the given limbs.
Creates a ` BigNat ` in the circuit from the given limbs .
limbs
Vec<Num<E>>
limb_width
usize
limbs
Vec<Num<E>>
limb_width
usize