pub trait BatchInvert<F: Field> {
// Required method
fn batch_invert(self) -> F;
}
Expand description
Extension trait for iterators over mutable field elements which allows those field elements to be inverted in a batch.
I: IntoIterator<Item = &'a mut F: Field + ConstantTimeEq>
implements this trait when
the alloc
feature flag is enabled.
For non-allocating contexts, see the BatchInverter
struct.
Required Methods§
Sourcefn batch_invert(self) -> F
fn batch_invert(self) -> F
Consumes this iterator and inverts each field element (when nonzero). Zero-valued elements are left as zero.
Returns the inverse of the product of all nonzero field elements.