We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07896fd commit 577f1f2Copy full SHA for 577f1f2
relations/src/utils/linear_combination.rs
@@ -89,13 +89,11 @@ impl<F: Field> LinearCombination<F> {
89
pub fn sum_vars(variables: &[Variable]) -> Self {
90
let lc = variables
91
.iter()
92
- .map(|&var| var)
93
- .into_iter()
94
- .chunk_by(|&x| x)
95
96
- .map(|(var, group)| (F::from(group.count() as u64), var))
+ .map(|&var| (F::ONE, var))
97
.collect::<Vec<_>>();
98
- Self(lc)
+ let mut lc = LinearCombination(lc);
+ lc.compactify();
+ lc
99
}
100
101
/// Create a new linear combination from the sum of many (coefficient, variable) pairs.
0 commit comments