Skip to content
Snippets Groups Projects
Commit 64fa85a6 authored by HEME Clement's avatar HEME Clement
Browse files

Latex formating - removed other changes

parent f77d24e6
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment