pub trait LinearCombination: Group {
    // Provided method
    fn lincomb(x: &Self, k: &Self::Scalar, y: &Self, l: &Self::Scalar) -> Self { ... }
}
Available on crate feature arithmetic only.
Expand description

Linear combination.

This trait enables crates to provide an optimized implementation of linear combinations (e.g. Shamir’s Trick), or otherwise provides a default non-optimized implementation.

Provided Methods§

source

fn lincomb(x: &Self, k: &Self::Scalar, y: &Self, l: &Self::Scalar) -> Self

Calculates x * k + y * l.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<P: LinearCombinationExt<[(P, Self::Scalar); 2]>> LinearCombination for P

Blanket impl of the legacy LinearCombination trait for types which impl the new LinearCombinationExt trait for 2-element arrays.