Function lbcrypto::EvalChebyshevFunctionPtxt

Function Documentation

std::vector<double> lbcrypto::EvalChebyshevFunctionPtxt(std::function<double(double)> f, const std::vector<double> &ptxt, double a, double b, size_t d)

A cleartext version of CryptoContext<…>::EvalChebyshevFunction(…). It evaluates an approximation of func via Chebyshev polynomials of a bounded degree, over a specified interval [a,b].

Parameters
  • func – is the function to be approximated

  • ptxt – is a vector of plaintext inputs

  • a – is the bottom of the interval over chichfunc is approximated

  • b – is the top of the interval over chichfunc is approximated

  • degree – is the desired degree of approximation

Returns

Evaluation of the approximated function over the plaintexts.