pub fn evaluate<P: Borrow<F::E>>(&self, point: P, field: &F) -> F::E 
    {
        // compute Newton points
        let mut newton_points = Vec::with_capacity(self.points.len() - 1);
        newton_points.push(field.one());
        for i in 0..self.points.len() - 1 {
            let diff = field.sub(point.borrow(), &self.points[i]);
            let product = field.mul(&newton_points[i], diff);
            newton_points.push(product);
        }
        
        ::numtheory::weighted_sum(&self.coefficients, &newton_points, field)
    }
/// Note that care must be taken to ensure that the `field` is used here is the same 
/// as the one used in `compute`.
Note that care must be taken to ensure that the `field` is used here is the same
as the one used in `compute`.
Note that care must be taken to ensure that the ` field ` is used here is the same as the one used in ` compute ` .
pub fn evaluate<P: Borrow<F::E>>(&self, point: P, field: &F) -> F::E 
    {
        // compute Newton points
        let mut newton_points = Vec::with_capacity(self.points.len() - 1);
        newton_points.push(field.one());
        for i in 0..self.points.len() - 1 {
            let diff = field.sub(point.borrow(), &self.points[i]);
            let product = field.mul(&newton_points[i], diff);
            newton_points.push(product);
        }
        ::numtheory::weighted_sum(&self.coefficients, &newton_points, field)
    }
pub fn evaluate < P : Borrow < F :: E > > ( & self , point : P , field : & F ) -> F :: E { // compute Newton points let mut newton_points = Vec :: with_capacity ( self . points . len ( ) - 1 ) ; newton_points . push ( field . one ( ) ) ; for i in 0 .. self . points . len ( ) - 1 { let diff = field . sub ( point . borrow ( ) , & self . points [ i ] ) ; let product = field . mul ( & newton_points [ i ] , diff ) ; newton_points . push ( product ) ; } :: numtheory :: weighted_sum ( & self . coefficients , & newton_points , field ) }
Note that care must be taken to ensure that the `field` is used here is the same
as the one used in `compute`.
Note that care must be taken to ensure that the ` field ` is used here is the same as the one used in ` compute ` .
&self
point
P
field
&F