eval_linear_wsum: Weighted sum of ciphertexts (CKKS)

View source: R/methods-eval-backlog.R

eval_linear_wsumR Documentation

Weighted sum of ciphertexts (CKKS)

Description

Computes constants[1] * ciphertexts[[1]] + ... + constants[n] * ciphertexts[[n]].

Usage

eval_linear_wsum(ciphertexts, constants)

eval_linear_wsum_mutable(constants, ciphertexts)

Arguments

ciphertexts

A non-empty list of Ciphertext objects.

constants

One constant per ciphertext: an integer, double or complex vector. Each type is evaluated with its own arithmetic.

Details

eval_linear_wsum_mutable() may adjust the given ciphertexts (their level and scale) while it works, which saves copies. It takes the constants first, as the C++ function of that name does.

Value

A Ciphertext.


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