@@ -31,8 +31,6 @@ pub trait Poly<Fp: FpTrait>:
31
31
32
32
fn scale ( & self , a : & Fp ) -> Self ;
33
33
34
- fn evaluate_at_one ( & self ) -> Fp ;
35
- fn evaluate_at_minus_one ( & self ) -> Fp ;
36
34
fn evaluate ( & self , a : & Fp ) -> Fp ;
37
35
38
36
fn resultant_from_roots ( & self , ai : & [ Fp ] ) -> Fp ;
@@ -248,32 +246,6 @@ impl<Fp: FpTrait> Polynomial<Fp> {
248
246
res
249
247
}
250
248
251
- pub fn evaluate_at_one ( & self ) -> Fp {
252
- if self . len ( ) == 0 {
253
- return Fp :: ZERO ;
254
- }
255
- let mut res = self . coeffs [ 0 ] ;
256
- for i in 1 ..self . len ( ) {
257
- res += self . coeffs [ i]
258
- }
259
- res
260
- }
261
-
262
- pub fn evaluate_at_minus_one ( & self ) -> Fp {
263
- if self . len ( ) == 0 {
264
- return Fp :: ZERO ;
265
- }
266
- let mut res = self . coeffs [ 0 ] ;
267
- for i in 1 ..self . len ( ) {
268
- if ( i & 1 ) == 1 {
269
- res -= self . coeffs [ i]
270
- } else {
271
- res += self . coeffs [ i]
272
- }
273
- }
274
- res
275
- }
276
-
277
249
/// Compute the resultant of self with a polynomial g = \prod {x - ai}
278
250
/// given the roots ai.
279
251
// TODO: this is a very slow and stupid method, but speed comes later and
@@ -325,12 +297,6 @@ impl<Fp: FpTrait> Poly<Fp> for Polynomial<Fp> {
325
297
fn evaluate ( & self , a : & Fp ) -> Fp {
326
298
self . evaluate ( a)
327
299
}
328
- fn evaluate_at_one ( & self ) -> Fp {
329
- self . evaluate_at_one ( )
330
- }
331
- fn evaluate_at_minus_one ( & self ) -> Fp {
332
- self . evaluate_at_minus_one ( )
333
- }
334
300
335
301
fn resultant_from_roots ( & self , ai : & [ Fp ] ) -> Fp {
336
302
self . resultant_from_roots ( ai)
0 commit comments