
Sum the rows or the columns of an encrypted matrix
Source:R/methods-eval-backlog.R
eval_sum_rows.RdA matrix is packed into the slots row by row. eval_sum_rows()
adds its rows together and eval_sum_cols() its columns. Each
takes the keys made by the matching key generator, which returns
them as an EvalKeyMap.
Usage
eval_sum_rows(ct, num_rows, eval_sum_key_map, subring_dim = 0L)
eval_sum_cols(ct, num_cols, eval_sum_key_map)
eval_sum_rows_key_gen(
cc,
sk,
public_key = NULL,
row_size = 0L,
subring_dim = 0L
)
eval_sum_cols_key_gen(cc, sk)Arguments
- ct
A
Ciphertextholding the matrix.- num_rows, num_cols
Integer; the number of rows, or columns, of the matrix.
- eval_sum_key_map
An
EvalKeyMapfromeval_sum_rows_key_gen()oreval_sum_cols_key_gen().- subring_dim
Integer; the subring dimension,
0L(default) for the full ring.- cc
A
CryptoContext.- sk
A
PrivateKey.- public_key
A
PublicKey, orNULL(default) for the form that takes no public key.- row_size
Integer; the length of a row,
0L(default) for the value the library derives.