
Generate a lookup table for an arbitrary plaintext function
Source:R/binfhe.R
generate_lut_via_function.RdComputes f(0:(p-1), p) and returns it as a numeric vector
suitable for eval_func(). This is the R-side analogue of
OpenFHE's GenerateLUTviaFunction — we don't bind the C++
helper because its signature takes a raw function pointer that
can't capture an R closure, and R is natively vectorised so a
pure-R helper is both simpler and faster than wiring an R
callback through cpp11.