pub fn new(tensor: &[F]) -> Self {
        let mut inverses = tensor.to_vec();
        ark_ff::batch_inversion(&mut inverses);

        let mut accumulated_product = F::one();
        let mut carries = Vec::new();
        for (elt, inv_elt) in tensor.iter().zip(inverses) {
            // the i-th carry is setting the i-th bit to zero and all successive bits to one.
            carries.push(accumulated_product * inv_elt);
            accumulated_product *= elt;
        }
        // the most significant (artificial) carry, to multiply when all bits are set,
        // is the inverse of 1 times the product of all elements.
        carries.push(accumulated_product);

        Self {
            carries,
            elements: tensor.to_vec(),
            current: F::one(),
            current_index: 1 << tensor.len(),
        }
    }
/// Create a new Tensoriterator starting from index start_index.
Create a new Tensoriterator starting from index start_index.
Create a new Tensoriterator starting from index start_index .
pub fn new(tensor: &[F]) -> Self {
        let mut inverses = tensor.to_vec();
        ark_ff::batch_inversion(&mut inverses);
        let mut accumulated_product = F::one();
        let mut carries = Vec::new();
        for (elt, inv_elt) in tensor.iter().zip(inverses) {
            // the i-th carry is setting the i-th bit to zero and all successive bits to one.
            carries.push(accumulated_product * inv_elt);
            accumulated_product *= elt;
        }
        // the most significant (artificial) carry, to multiply when all bits are set,
        // is the inverse of 1 times the product of all elements.
        carries.push(accumulated_product);
        Self {
            carries,
            elements: tensor.to_vec(),
            current: F::one(),
            current_index: 1 << tensor.len(),
        }
    }
pub fn new ( tensor : & [ F ] ) -> Self { let mut inverses = tensor . to_vec ( ) ; ark_ff :: batch_inversion ( & mut inverses ) ; let mut accumulated_product = F :: one ( ) ; let mut carries = Vec :: new ( ) ; for ( elt , inv_elt ) in tensor . iter ( ) . zip ( inverses ) { // the i-th carry is setting the i-th bit to zero and all successive bits to one. carries . push ( accumulated_product * inv_elt ) ; accumulated_product *= elt ; } // the most significant (artificial) carry, to multiply when all bits are set, // is the inverse of 1 times the product of all elements. carries . push ( accumulated_product ) ; Self { carries , elements : tensor . to_vec ( ) , current : F :: one ( ) , current_index : 1 << tensor . len ( ) , } }
Create a new Tensoriterator starting from index start_index.
Create a new Tensoriterator starting from index start_index .
tensor
&[F]