24 #ifndef SRC_CORE_LIB_UTILS_PARMFACTORY_H_ 25 #define SRC_CORE_LIB_UTILS_PARMFACTORY_H_ 32 #include "lattice/dcrtpoly.h" 33 #include "math/backend.h" 34 #include "math/distrgen.h" 36 #include "utils/inttypes.h" 39 #include "lattice/ildcrtparams.h" 40 #include "lattice/ilelement.h" 55 inline shared_ptr<ILDCRTParams<I>> GenerateDCRTParams(usint m, usint numOfTower,
58 DEBUG(
"in GenerateDCRTParams");
62 if (numOfTower == 0) {
63 PALISADE_THROW(
math_error,
"Can't make parms with numOfTower == 0");
66 std::vector<NativeInteger> moduli(numOfTower);
67 std::vector<NativeInteger> rootsOfUnity(numOfTower);
79 DEBUG(
"j " << j <<
" modulus " << q <<
" rou " << rootsOfUnity[j]);
80 if (++j == numOfTower)
break;
85 auto params = std::make_shared<ILDCRTParams<I>>(m, moduli, rootsOfUnity);
Ideal lattice using a vector representation.
Definition: exception.h:113
IntType NextPrime(const IntType &q, uint64_t cyclotomicOrder)
Definition: nbtheory.cpp:537
Wrapper class to hold the parameters for Element types and their inheritors.
OutputType ConvertToInt() const
Definition: ubintnat.h:1886
IntType RootOfUnity(usint m, const IntType &modulo)
Definition: nbtheory.cpp:270
Definition: binfhecontext.h:36
Wrapper class to hold the parameters for integer lattice operations and their inheritors.
Main class for big integers represented as an array of native (primitive) unsigned integers...
Definition: backend.h:60