elliptic_curve_tools

Trait SumOfProducts

source
pub trait SumOfProducts: Group<Scalar: PrimeFieldBits> {
    // Required method
    fn sum_of_products(pairs: &[(Self::Scalar, Self)]) -> Self;
}
Expand description

A trait for a group that can compute the sum of products of a slice of group elements and a slice of scalars. The length of the slices must be equal.

Required Methods§

source

fn sum_of_products(pairs: &[(Self::Scalar, Self)]) -> Self

Compute the sum of products of a slice of group elements and a slice of scalars as group[0]^field[0] * group[1]^field[1] * … * group[n]^field[n]

Object Safety§

This trait is not object safe.

Implementors§