Hi!
I am learning the implementation of Keyswtich, and i would like to know why we need to check whether sizeQ <= (a * (numPartQ - 1))
in the following part?
// Compute ceil(sizeQ/numPartQ), the # of towers per digit
uint32_t a = static_cast<uint32_t>(std::ceil(static_cast<double>(sizeQ) / numPartQ));
if (sizeQ <= (a * (numPartQ - 1))) {
auto str = "HYBRID key switching parameters: Can't appropriately distribute " + std::to_string(sizeQ) +
" towers into " + std::to_string(numPartQ) +
" digits. Please select different number of digits.";
OPENFHE_THROW(str);
}
Thanks for your time!