Class EncodingParamsImpl

Inheritance Relationships

Base Type

Class Documentation

class lbcrypto::EncodingParamsImpl : public lbcrypto::Serializable

Inheritence diagram for lbcrypto::EncodingParamsImpl:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="lbcrypto::EncodingParamsImpl" tooltip="lbcrypto::EncodingParamsImpl" fillcolor="#BFBFBF"]
    "2" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for lbcrypto::EncodingParamsImpl:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="lbcrypto::EncodingParamsImpl" tooltip="lbcrypto::EncodingParamsImpl" fillcolor="#BFBFBF"]
    "2" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

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) noexcept

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.

virtual ~EncodingParamsImpl() = default

Destructor.

inline PlaintextModulus GetPlaintextModulus() const

Getter for the plaintext modulus.

Returns

The plaintext modulus.

inline void SetPlaintextModulus(PlaintextModulus plaintextModulus)

Setter for the plaintext modulus.

inline NativeInteger GetPlaintextRootOfUnity() const

Getter for the plaintext modulus root of unity.

Returns

The plaintext modulus root of unity.

inline void SetPlaintextRootOfUnity(NativeInteger plaintextRootOfUnity)

Setter for the plaintext modulus root of unity.

inline NativeInteger GetPlaintextBigModulus() const

Getter for the big plaintext modulus.

Returns

The plaintext modulus.

inline void SetPlaintextBigModulus(NativeInteger plaintextBigModulus)

Setter for the big plaintext modulus.

inline NativeInteger GetPlaintextBigRootOfUnity() const

Getter for the big plaintext modulus root of unity.

Returns

The big plaintext modulus root of unity.

inline void SetPlaintextBigRootOfUnity(NativeInteger plaintextBigRootOfUnity)

Setter for the big plaintext modulus root of unity.

inline uint32_t GetPlaintextGenerator() const

Getter for the plaintext generator.

Returns

The plaintext generator.

inline void SetPlaintextGenerator(uint32_t plaintextGenerator)

Setter for the plaintext generator.

inline uint32_t GetBatchSize() const

Getter for the plaintext batch size.

Returns

The plaintext batch size.

inline void SetBatchSize(uint32_t batchSize)

Setter for the 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.

template<class Archive>
inline void save(Archive &ar, std::uint32_t const version) const
template<class Archive>
inline void load(Archive &ar, std::uint32_t const version)
inline virtual std::string SerializedObjectName() const

Public Static Functions

static inline uint32_t SerializedVersion()

Protected Functions

inline std::ostream &doprint(std::ostream &out) const

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.