Class EncodingParamsImpl
Defined in File encodingparams.h
Page Contents
Inheritance Relationships
Base Type
public lbcrypto::Serializable
(Class Serializable)
Class Documentation
-
class lbcrypto::EncodingParamsImpl : public lbcrypto::Serializable
Inheritence diagram for lbcrypto::EncodingParamsImpl:
Collaboration diagram for lbcrypto::EncodingParamsImpl:
All parameters for plaintext encodings into ciphertext space.
Public Functions
-
inline EncodingParamsImpl(PlaintextModulus plaintextModulus = 0, uint32_t batchSize = 0, uint32_t plaintextGenerator = 0, NativeInteger plaintextRootOfUnity = 0, NativeInteger plaintextBigModulus = 0, NativeInteger plaintextBigRootOfUnity = 0)
Main constructor. Supports (1) default constructor, (2) regular encoding with plaintext modulus set, (3) packed encoding with at least first two parameters set. All of the private members not explicitly included as arguments will be initialized to zero.
- Parameters
plaintextModulus – plainext modulus (used by all encodings)
plaintextGenerator – (used by packed encoding for plaintext slot rotation)
batchSize – sets the maximum batch size (as a power of 2) needed for EvalSum
-
inline EncodingParamsImpl(const EncodingParamsImpl &rhs)
Copy constructor.
- Parameters
&rhs – the input set of parameters which is copied.
-
inline EncodingParamsImpl(EncodingParamsImpl &&rhs)
Move constructor.
- Parameters
&rhs – the input set of parameters which is copied.
-
inline const EncodingParamsImpl &operator=(const EncodingParamsImpl &rhs)
Assignment Operator.
- Parameters
&rhs – the EncodingParamsImpl to be copied.
- Returns
the resulting EncodingParamsImpl.
-
inline virtual ~EncodingParamsImpl()
Destructor.
-
inline const PlaintextModulus &GetPlaintextModulus() const
Getter for the plaintext modulus.
- Returns
The plaintext modulus.
-
inline void SetPlaintextModulus(PlaintextModulus plaintextModulus)
Setter for the plaintext modulus.
-
inline const NativeInteger &GetPlaintextRootOfUnity() const
Getter for the plaintext modulus root of unity.
- Returns
The plaintext modulus root of unity.
-
inline void SetPlaintextRootOfUnity(const NativeInteger &plaintextRootOfUnity)
Setter for the plaintext modulus root of unity.
-
inline const NativeInteger &GetPlaintextBigModulus() const
Getter for the big plaintext modulus.
- Returns
The plaintext modulus.
-
inline void SetPlaintextBigModulus(const NativeInteger &plaintextBigModulus)
Setter for the big plaintext modulus.
-
inline const NativeInteger &GetPlaintextBigRootOfUnity() const
Getter for the big plaintext modulus root of unity.
- Returns
The big plaintext modulus root of unity.
-
inline void SetPlaintextBigRootOfUnity(const NativeInteger &plaintextBigRootOfUnity)
Setter for the big plaintext modulus root of unity.
-
inline usint GetPlaintextGenerator() const
Getter for the plaintext generator.
- Returns
The plaintext generator.
-
inline uint32_t GetBatchSize() const
Getter for the plaintext batch size.
- Returns
The plaintext batch size.
-
inline bool operator==(const EncodingParamsImpl &other) const
Equality operator for the parameters. Tests that all the parameters are equal.
- Parameters
other – the other parameter set to compare to.
- Returns
true if values of all data are equal.
-
inline bool operator!=(const EncodingParamsImpl &other) const
Inequality operator for the parameters. Tests that all the parameters are not equal.
- Parameters
other – the other parameter set to compare to.
- Returns
true if values of any data is not equal.
-
inline virtual std::string SerializedObjectName() const
Public Static Functions
-
static inline uint32_t SerializedVersion()
Friends
-
inline friend std::ostream &operator<<(std::ostream &out, const EncodingParamsImpl &item)
output stream operator.
- Parameters
out – the output stream to output.
item – the following object to output.
- Returns
the string output.
-
inline EncodingParamsImpl(PlaintextModulus plaintextModulus = 0, uint32_t batchSize = 0, uint32_t plaintextGenerator = 0, NativeInteger plaintextRootOfUnity = 0, NativeInteger plaintextBigModulus = 0, NativeInteger plaintextBigRootOfUnity = 0)