| 58 | } |
| 59 | |
| 60 | Diagonalizer::MatrixVector Diagonalizer::dediag( |
| 61 | const vector<Plaintext_<FFT_Data>>& products, int n_matrices) |
| 62 | { |
| 63 | int n_cols_out = products.size(); |
| 64 | MatrixVector res(n_matrices, {int(n_rows), n_cols_out}); |
| 65 | for (int i = 0; i < n_cols_out; i++) |
| 66 | { |
| 67 | auto& c = products.at(i); |
| 68 | for (int j = 0; j < n_matrices; j++) |
| 69 | { |
| 70 | res.at(j).entries.init(); |
| 71 | for (size_t k = 0; k < n_rows; k++) |
| 72 | res.at(j)[{k, i}] = c.element(j * n_rows + k); |
| 73 | } |
| 74 | } |
| 75 | return res; |
| 76 | } |
no test coverage detected