Skip to content

Commit 83690fa

Browse files
committed
remove old functions
1 parent 7a4a434 commit 83690fa

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/polynomial_ring/poly.rs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ pub trait Poly<Fp: FpTrait>:
3131

3232
fn scale(&self, a: &Fp) -> Self;
3333

34-
fn evaluate_at_one(&self) -> Fp;
35-
fn evaluate_at_minus_one(&self) -> Fp;
3634
fn evaluate(&self, a: &Fp) -> Fp;
3735

3836
fn resultant_from_roots(&self, ai: &[Fp]) -> Fp;
@@ -248,32 +246,6 @@ impl<Fp: FpTrait> Polynomial<Fp> {
248246
res
249247
}
250248

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-
277249
/// Compute the resultant of self with a polynomial g = \prod {x - ai}
278250
/// given the roots ai.
279251
// 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> {
325297
fn evaluate(&self, a: &Fp) -> Fp {
326298
self.evaluate(a)
327299
}
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-
}
334300

335301
fn resultant_from_roots(&self, ai: &[Fp]) -> Fp {
336302
self.resultant_from_roots(ai)

0 commit comments

Comments
 (0)