Trait ff::BatchInvert

source ·
pub trait BatchInvert<F: Field> {
    fn batch_invert(self) -> F;
}
Available on crate feature alloc only.
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§

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.

Implementors§