Lightweight type for describing the structure of a single slot of the plaintext space. More...
#include <PolyModRing.h>
Public Member Functions | |
| PolyModRing ()=delete | |
| PolyModRing & | operator= (const PolyModRing &)=delete |
| PolyModRing & | operator= (PolyModRing &&)=delete |
| PolyModRing (const PolyModRing &other)=default | |
| Copy constructor. More... | |
| PolyModRing (PolyModRing &&other)=default | |
| Move constructor. More... | |
| ~PolyModRing ()=default | |
| Destructor. More... | |
| PolyModRing (long p, long r, const NTL::ZZX &G) | |
| Constructor. More... | |
| bool | operator== (const PolyModRing &rhs) const noexcept |
| Equality operator. More... | |
| bool | operator!= (const PolyModRing &rhs) const noexcept |
| Not-equals operator. More... | |
Public Attributes | |
| const long | p |
| The characteristic of the plaintext space. This should be prime. More... | |
| const long | r |
| The power of p used in the plaintext space coefficient modulus. More... | |
| const NTL::ZZX | G |
| The irreducible factor of Phi_m(X) used for the algebra of the individual slots. More... | |
| const long | p2r |
| The plaintext space coefficient modulus, equal to p^r. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const PolyModRing &ring) |
| Output shift operator. More... | |
Detailed Description
Lightweight type for describing the structure of a single slot of the plaintext space.
A single slot of the plaintext space is isomorphic to
for some irreducible factor G of
, so the main useful members of this struct are p, r, G, and p2r.
The fields of this struct are all const, so they should be determined at the time of construction.
- Note
- This
structaggregates this often-useful information into a single placeholder for convenience.
Constructor & Destructor Documentation
◆ PolyModRing() [1/4]
|
delete |
◆ PolyModRing() [2/4]
|
default |
Copy constructor.
◆ PolyModRing() [3/4]
|
default |
Move constructor.
◆ ~PolyModRing()
|
default |
Destructor.
◆ PolyModRing() [4/4]
| helib::PolyModRing::PolyModRing | ( | long | p, |
| long | r, | ||
| const NTL::ZZX & | G | ||
| ) |
Constructor.
- Parameters
-
p The characteristic of the plaintext space. r The power of p used in the plaintext space coefficient modulus. G The irreducible factor of Phi_m(X) used for the algebra of the individual slots.
p^r will be calculated automatically.
- Note
- p should be a prime number.
Member Function Documentation
◆ operator!=()
|
noexcept |
Not-equals operator.
◆ operator=() [1/2]
|
delete |
◆ operator=() [2/2]
|
delete |
◆ operator==()
|
noexcept |
Equality operator.
Friends And Related Function Documentation
◆ operator<<
|
friend |
Output shift operator.
- Parameters
-
os Output std::ostream.ring PolyModRingobject to be written.
- Returns
- Input
std::ostreampost writing.
Member Data Documentation
◆ G
| const NTL::ZZX helib::PolyModRing::G |
The irreducible factor of Phi_m(X) used for the algebra of the individual slots.
◆ p
| const long helib::PolyModRing::p |
The characteristic of the plaintext space. This should be prime.
◆ p2r
| const long helib::PolyModRing::p2r |
The plaintext space coefficient modulus, equal to p^r.
◆ r
| const long helib::PolyModRing::r |
The power of p used in the plaintext space coefficient modulus.
1.9.1