pub fn evaluate_query_set<'a, F, P, T>(
    polys: impl IntoIterator<Item = &'a LabeledPolynomial<F, P>>,
    query_set: &QuerySet<T>,
) -> Evaluations<T, F>
where
    F: Field,
    P: 'a + Polynomial<F, Point = T>,
    T: Clone + Debug + Hash + Ord + Sync,
{
    let polys = BTreeMap::from_iter(polys.into_iter().map(|p| (p.label(), p)));
    let mut evaluations = Evaluations::new();
    for (label, (_, point)) in query_set {
        let poly = polys
            .get(label)
            .expect("polynomial in evaluated lc is not found");
        let eval = poly.evaluate(&point);
        evaluations.insert((label.clone(), point.clone()), eval);
    }
    evaluations
}
/// Evaluate the given polynomials at `query_set`.
Evaluate the given polynomials at `query_set`.
Evaluate the given polynomials at ` query_set ` .
pub fn evaluate_query_set<'a, F, P, T>(
    polys: impl IntoIterator<Item = &'a LabeledPolynomial<F, P>>,
    query_set: &QuerySet<T>,
) -> Evaluations<T, F>
where
    F: Field,
    P: 'a + Polynomial<F, Point = T>,
    T: Clone + Debug + Hash + Ord + Sync,
{
    let polys = BTreeMap::from_iter(polys.into_iter().map(|p| (p.label(), p)));
    let mut evaluations = Evaluations::new();
    for (label, (_, point)) in query_set {
        let poly = polys
            .get(label)
            .expect("polynomial in evaluated lc is not found");
        let eval = poly.evaluate(&point);
        evaluations.insert((label.clone(), point.clone()), eval);
    }
    evaluations
}
pub fn evaluate_query_set < ' a , F , P , T > ( polys : impl IntoIterator < Item = & ' a LabeledPolynomial < F , P > > , query_set : & QuerySet < T > , ) -> Evaluations < T , F > where F : Field , P : ' a + Polynomial < F , Point = T > , T : Clone + Debug + Hash + Ord + Sync , { let polys = BTreeMap :: from_iter ( polys . into_iter ( ) . map ( | p | ( p . label ( ) , p ) ) ) ; let mut evaluations = Evaluations :: new ( ) ; for ( label , ( _ , point ) ) in query_set { let poly = polys . get ( label ) . expect ( " " ) ; let eval = poly . evaluate ( & point ) ; evaluations . insert ( ( label . clone ( ) , point . clone ( ) ) , eval ) ; } evaluations }
Evaluate the given polynomials at `query_set`.
Evaluate the given polynomials at ` query_set ` .
polys
impl IntoIterator<Item = &'a LabeledPolynomial<F, P>>
query_set
&QuerySet<T>