From f65cbeaf8fe628ddba036bbc46a1c5d1b6e2ac4b Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Mon, 30 Sep 2024 20:44:20 +0300 Subject: [PATCH] dense_mlpoly.rs: Fix bound functions (#73) --- src/dense_mlpoly.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dense_mlpoly.rs b/src/dense_mlpoly.rs index 3884214..4400b42 100644 --- a/src/dense_mlpoly.rs +++ b/src/dense_mlpoly.rs @@ -216,6 +216,7 @@ impl DensePolynomial { for i in 0..n { self.Z[i] = self.Z[i] + r * (self.Z[i + n] - self.Z[i]); } + self.Z.truncate(n); // Resize the vector Z to the new length self.num_vars -= 1; self.len = n; } @@ -225,6 +226,7 @@ impl DensePolynomial { for i in 0..n { self.Z[i] = self.Z[2 * i] + r * (self.Z[2 * i + 1] - self.Z[2 * i]); } + self.Z.truncate(n); // Resize the vector Z to the new length self.num_vars -= 1; self.len = n; }