fix lattice
This commit is contained in:
parent
7bc9d1f735
commit
3e07dac628
@ -34,7 +34,7 @@ impl Matrix {
|
||||
|
||||
// -x0 on diagonal, 0 everywhere else
|
||||
let x0 = &ciphertexts[0];
|
||||
for i in 0..n - 1 {
|
||||
for i in 1..n {
|
||||
let mut row = vec![int!(0); n];
|
||||
row[i] = -x0.clone();
|
||||
values.extend(row);
|
||||
@ -92,12 +92,12 @@ mod tests {
|
||||
int!(4),
|
||||
int!(8),
|
||||
int!(12),
|
||||
int!(0),
|
||||
int!(-5),
|
||||
int!(0),
|
||||
int!(0),
|
||||
int!(0),
|
||||
int!(-5),
|
||||
int!(0),
|
||||
];
|
||||
|
||||
let lattice = Matrix::new_lattice(noise_bits, ciphertexts).unwrap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user