R/encoding-params.R

## OPENFHE PYTHON SOURCE: src/lib/bindings.cpp (EncodingParams wrapper)

#' Encoding Parameters (opaque)
#'
#' Wraps `std::shared_ptr<EncodingParamsImpl>` on the C++ side.
#' Returned by `get_encoding_params(cc)` and by
#' `Plaintext::GetEncodingParams()` once the corresponding
#' Plaintext accessor lands. This class ships as scaffolding
#' only: the S7 class definition is in place so that the getter
#' wiring can treat it as already defined, but there is no
#' constructor path from R.
#'
#' @param ptr External pointer (internal use)
#' @return An S7 object of class `EncodingParams`, inheriting from
#'   [OpenFHEObject], whose `ptr` property holds an external pointer to
#'   the C++ `EncodingParamsImpl`. It is an opaque token describing how
#'   values are packed into a plaintext, obtained from
#'   `get_encoding_params()` rather than by calling this constructor
#'   directly.
#' @export
EncodingParams <- new_class("EncodingParams",
  parent = OpenFHEObject,
  package = "openfhe.R"
)

method(print, EncodingParams) <- function(x, ...) {
  cli::cli_text("{.cls EncodingParams} [{if (ptr_is_valid(x)) 'active' else 'null'}]")
  invisible(x)
}

Try the openfhe.R package in your browser

Any scripts or data that you put into this service are public.

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