Class AdvancedSHECKKSRNS

Inheritance Relationships

Base Type

Class Documentation

class lbcrypto::AdvancedSHECKKSRNS : public lbcrypto::AdvancedSHERNS

Inheritence diagram for lbcrypto::AdvancedSHECKKSRNS:

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

Collaboration diagram for lbcrypto::AdvancedSHECKKSRNS:

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

Public Functions

inline virtual ~AdvancedSHECKKSRNS()
virtual Ciphertext<DCRTPoly> EvalLinearWSum(std::vector<ConstCiphertext<DCRTPoly>> &ciphertexts, const std::vector<double> &constants) const override

Virtual function for computing the linear weighted sum of a vector of ciphertexts.

Parameters
  • ciphertexts – vector of input ciphertexts.

  • constants – vector containing double weights.

Returns

A ciphertext containing the linear weighted sum.

virtual Ciphertext<DCRTPoly> EvalLinearWSumMutable(std::vector<Ciphertext<DCRTPoly>> &ciphertexts, const std::vector<double> &constants) const override

Function for computing the linear weighted sum of a vector of ciphertexts. This is a mutable method, meaning that the level/depth of input ciphertexts may change.

Parameters
  • ciphertexts – vector of input ciphertexts.

  • constants – vector containing double weights.

Returns

A ciphertext containing the linear weighted sum.

virtual Ciphertext<DCRTPoly> EvalPoly(ConstCiphertext<DCRTPoly> ciphertext, const std::vector<double> &coefficients) const override

Method for polynomial evaluation for polynomials represented in the power series. This uses a binary tree computation of the polynomial powers.

Parameters
  • &cipherText – input ciphertext

  • &coefficients – is the vector of coefficients in the polynomial; the size of the vector is the degree of the polynomial + 1

Returns

the result of polynomial evaluation.

virtual Ciphertext<DCRTPoly> EvalPolyLinear(ConstCiphertext<DCRTPoly> x, const std::vector<double> &coefficients) const override

Method for polynomial evaluation for polynomials represented in the power series. This uses a binary tree computation of the polynomial powers.

Parameters
  • &cipherText – input ciphertext

  • &coefficients – is the vector of coefficients in the polynomial; the size of the vector is the degree of the polynomial + 1

Returns

the result of polynomial evaluation.

Ciphertext<DCRTPoly> InnerEvalPolyPS(ConstCiphertext<DCRTPoly> x, const std::vector<double> &coefficients, uint32_t k, uint32_t m, std::vector<Ciphertext<DCRTPoly>> &powers, std::vector<Ciphertext<DCRTPoly>> &powers2) const
virtual Ciphertext<DCRTPoly> EvalPolyPS(ConstCiphertext<DCRTPoly> x, const std::vector<double> &coefficients) const override
virtual Ciphertext<DCRTPoly> EvalChebyshevSeries(ConstCiphertext<DCRTPoly> ciphertext, const std::vector<double> &coefficients, double a, double b) const override

Method for evaluating Chebyshev polynomial interpolation; first the range [a,b] is mapped to [-1,1] using linear transformation 1 + 2 (x-a)/(b-a) If the degree of the polynomial is less than 5, use EvalChebyshevSeriesLinear, otherwise, use EvalChebyshevSeriesPS.

Parameters
  • &cipherText – input ciphertext

  • &coefficients – is the vector of coefficients in Chebyshev expansion

  • a – - lower bound of argument for which the coefficients were found

  • b – - upper bound of argument for which the coefficients were found

Returns

the result of polynomial evaluation.

virtual Ciphertext<DCRTPoly> EvalChebyshevSeriesLinear(ConstCiphertext<DCRTPoly> ciphertext, const std::vector<double> &coefficients, double a, double b) const override
Ciphertext<DCRTPoly> InnerEvalChebyshevPS(ConstCiphertext<DCRTPoly> x, const std::vector<double> &coefficients, uint32_t k, uint32_t m, std::vector<Ciphertext<DCRTPoly>> &T, std::vector<Ciphertext<DCRTPoly>> &T2) const
virtual Ciphertext<DCRTPoly> EvalChebyshevSeriesPS(ConstCiphertext<DCRTPoly> ciphertext, const std::vector<double> &coefficients, double a, double b) const override
template<class Archive>
inline void save(Archive &ar) const
template<class Archive>
inline void load(Archive &ar)
inline std::string SerializedObjectName() const