add example

This commit is contained in:
Janmajaya Mall
2024-06-11 17:31:01 +05:30
parent 1a2fc7a6b4
commit 1e0fb86782
7 changed files with 98 additions and 16 deletions

View File

@@ -3,7 +3,7 @@ use num_traits::{ConstZero, FromPrimitive, PrimInt};
use crate::{backend::Modulus, decomposer::Decomposer};
#[derive(Clone, PartialEq)]
pub(crate) struct BoolParameters<El> {
pub struct BoolParameters<El> {
rlwe_q: CiphertextModulus<El>,
lwe_q: CiphertextModulus<El>,
br_q: usize,
@@ -181,7 +181,7 @@ pub(crate) struct PolynomialSize(pub(crate) usize);
/// T equals modulus when modulus is non-native. Otherwise T equals 0. bool is
/// true when modulus is native, false otherwise.
pub(crate) struct CiphertextModulus<T>(T, bool);
pub struct CiphertextModulus<T>(T, bool);
impl<T: ConstZero> CiphertextModulus<T> {
const fn new_native() -> Self {