The structure of Z[X]/(Phi_m(X), p) More...
#include <PAlgebra.h>
Public Member Functions | |
| PAlgebraMod (const PAlgebra &zMStar, long r) | |
| template<class type > | |
| const PAlgebraModDerived< type > & | getDerived (type) const |
| bool | operator== (const PAlgebraMod &other) const |
| bool | operator!= (const PAlgebraMod &other) const |
| PA_tag | getTag () const |
| Returns the type tag: PA_GF2_tag or PA_zz_p_tag. | |
| const PAlgebra & | getZMStar () const |
| Returns reference to underlying PAlgebra object. | |
| const vector< ZZX > & | getFactorsOverZZ () const |
| Returns reference to the factorization of Phi_m(X) mod p^r, but as ZZX's. | |
| long | getR () const |
| The value r. | |
| long | getPPowR () const |
| The value p^r. | |
| void | restoreContext () const |
| Restores the NTL context for p^r. | |
| void | genMaskTable () const |
| Generates the "mask table" that is used to support rotations. More... | |
The structure of Z[X]/(Phi_m(X), p)
An object of type PAlgebraMod stores information about a PAlgebra object zMStar, and an integer r. It also provides support for encoding and decoding plaintext slots.
the PAlgebra object zMStar defines (Z/mZ)^* /(0), and the PAlgebraMod object stores various tables related to the polynomial ring Z/(p^r)[X]. To do this most efficiently, if p == 2 and r == 1, then these polynomials are represented as GF2X's, and otherwise as zz_pX's. Thus, the types of these objects are not determined until run time. As such, we need to use a class heirarchy, as follows.
|
inline |
Generates the "mask table" that is used to support rotations.
maskTable[i][j] is a polynomial representation of a mask that is 1 in all slots whose i'th coordinate is at least j, and 0 elsewhere. We have:
maskTable.size() == zMStar.numOfGens() // # of generators
for i = 0..maskTable.size()-1:
maskTable[i].size() == zMStar.OrderOf(i) // order of generator i
|
inline |
Downcast operator example: const PAlgebraModDerived<PA_GF2>& rep = alMod.getDerived(PA_GF2());
1.8.3.1