eval_chebyshev_function: Evaluate a user-supplied function on a CKKS ciphertext via...

View source: R/methods-ckks.R

eval_chebyshev_functionR Documentation

Evaluate a user-supplied function on a CKKS ciphertext via Chebyshev approximation

Description

Computes the Chebyshev coefficients for func on ⁠[a, b]⁠ via eval_chebyshev_coefficients() and applies the resulting series to ct via eval_chebyshev(). This mirrors the upstream CryptoContext::EvalChebyshevFunction helper, which is a thin wrapper around EvalChebyshevCoefficients followed by EvalChebyshevSeries on the C++ side.

Usage

eval_chebyshev_function(ct, func, a, b, degree)

Arguments

ct

A Ciphertext holding CKKS-encoded real values in ⁠[a, b]⁠.

func

An R function taking a single numeric argument and returning a numeric scalar. It is evaluated on cleartext Chebyshev nodes inside ⁠[a, b]⁠ to produce the approximating coefficients.

a

Lower bound of the approximation interval.

b

Upper bound of the approximation interval.

degree

Chebyshev polynomial degree (must be >= 1).

Value

A Ciphertext holding the elementwise approximation of func applied to the plaintext slots of ct.

See Also

eval_chebyshev(), eval_chebyshev_coefficients(), eval_logistic(), eval_sin(), eval_cos(), eval_divide().


openfhe.R documentation built on Nov. 13, 2026, 5:07 p.m.