idiomatique change
This commit is contained in:
@ -11,14 +11,15 @@ impl TannerGraph {
|
||||
let mut check = vec![vec![]; matrix.rows];
|
||||
let mut bits = vec![vec![]; matrix.cols];
|
||||
|
||||
for i in 0..matrix.rows {
|
||||
for j in 0..matrix.cols {
|
||||
for (i, row_check) in check.iter_mut().enumerate() {
|
||||
for (j, col_bits) in bits.iter_mut().enumerate() {
|
||||
if matrix.get(i, j) == 0 {
|
||||
check[i].push(j);
|
||||
bits[j].push(i);
|
||||
row_check.push(j);
|
||||
col_bits.push(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Self { check, bits }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user