pub(crate) fn linear_combination<F: Field, PP>(
    polynomials: &[PP],
    challenges: &[F],
) -> Option<Vec<F>>
where
    PP: Borrow<Vec<F>>,
{
    polynomials
        .iter()
        .zip(challenges.iter())
        .map(|(p, &c)| &DensePolynomial::from_coefficients_vec(p.borrow().to_vec()) * c)
        .reduce(|x, y| x + y)?
        .coeffs
        .into()
}
/// Compute a linear combination of the polynomials `polynomials` with the given challenges.
Compute a linear combination of the polynomials `polynomials` with the given challenges.
Compute a linear combination of the polynomials ` polynomials ` with the given challenges .
pub(crate) fn linear_combination<F: Field, PP>(
    polynomials: &[PP],
    challenges: &[F],
) -> Option<Vec<F>>
where
    PP: Borrow<Vec<F>>,
{
    polynomials
        .iter()
        .zip(challenges.iter())
        .map(|(p, &c)| &DensePolynomial::from_coefficients_vec(p.borrow().to_vec()) * c)
        .reduce(|x, y| x + y)?
        .coeffs
        .into()
}
pub ( crate ) fn linear_combination < F : Field , PP > ( polynomials : & [ PP ] , challenges : & [ F ] , ) -> Option < Vec < F > > where PP : Borrow < Vec < F > > , { polynomials . iter ( ) . zip ( challenges . iter ( ) ) . map ( | ( p , & c ) | & DensePolynomial :: from_coefficients_vec ( p . borrow ( ) . to_vec ( ) ) * c ) . reduce ( | x , y | x + y ) ? . coeffs . into ( ) }
Compute a linear combination of the polynomials `polynomials` with the given challenges.
Compute a linear combination of the polynomials ` polynomials ` with the given challenges .
polynomials
&[PP]
challenges
&[F]