From 64fa85a60eafe49f6ca8271077977ff1d5e2f432 Mon Sep 17 00:00:00 2001
From: "c.heme" <clement.heme@student.isae-supaero.fr>
Date: Mon, 31 Mar 2025 09:29:01 +0200
Subject: [PATCH] Latex formating - removed other changes

---
 src/fec.rs | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/fec.rs b/src/fec.rs
index 715ef2f8..d41eb60c 100644
--- a/src/fec.rs
+++ b/src/fec.rs
@@ -31,14 +31,6 @@ pub struct Shard<F: PrimeField> {
 }
 
 impl<F: PrimeField> Shard<F> {
-    fn dual_combination(this: &Vec<F>, alpha: F, other: &Vec<F>, beta: F) -> Vec<F> {
-        this
-            .iter()
-            .zip(other.iter())
-            .map(|(s, o)| s.mul(alpha) + o.mul(beta))
-            .collect()
-    }
- 
     /// compute the linear combination between two [`Shard`]s
     ///
     /// if we denote the [`Shard`] itself and the other [`Shard`] by $s$ and $o$ respectively, the
@@ -53,12 +45,23 @@ impl<F: PrimeField> Shard<F> {
 
         Shard {
             k: self.k,
-            linear_combination: Self::dual_combination(&self.linear_combination, alpha, &other.linear_combination, beta),
+            linear_combination: self
+                .linear_combination
+                .iter()
+                .zip(other.linear_combination.iter())
+                .map(|(l, r)| l.mul(alpha) + r.mul(beta))
+                .collect(),
             hash: self.hash.clone(),
-            data: Self::dual_combination(&self.data, alpha, &other.data, beta),
+            data: self
+                .data
+                .iter()
+                .zip(other.data.iter())
+                .map(|(es, eo)| es.mul(alpha) + eo.mul(beta))
+                .collect(),
             size: self.size,
         }
     }
+
 }
 
 /// compute the linear combination between an arbitrary number of [`Shard`]s
-- 
GitLab