Closed marvellous987 closed 10 months ago
You have a mistake in how you are using std::vector
. Namely, the constructor you are using initializes your vector with 4*t
empty ciphertexts, but this isn't what you are hoping to do, because now you're appending to that with std::vector<T>::push_back
, so you end up calling Evaluator::sub
on empty ciphertexts. Hence, it complains the parameters are not valid for this operation.
Instead, for each of the three matrices, use:
vector<Ciphertext> matrix;
matrix.reserve(4*t);
Hi all,
I encounter the following error, and may I ask for any help/suggestions about this.
First, I tried to generate a series of plaintext and ciphertext and store into a vector, under the BFV scheme.
Afterwards, I use the evaluator doing substraction:
And then I received the following error:
which should be come from the function
evaluator.sub(..., ..., ...)
.Then, I dive into the library and found out that
is_metadata_valid_for()
returnfalse
in the parameter check, and the 4 entries of theparms_id
array are all0
instead of some non-zero values.I test with the following case (no vectors involved), which works well and no error:
May I ask for any help/suggestions? Thank you very much!