This commit is contained in:
Jean-Philippe Bossuat
2025-04-25 15:24:09 +02:00
parent 90b34e171d
commit 2a96f89047
16 changed files with 864 additions and 895 deletions

View File

@@ -1,6 +1,6 @@
use crate::elem::{Elem, ElemCommon};
use crate::parameters::Parameters;
use base2k::{Infos, LAYOUT, Module, VecZnx, VmpPMat};
use base2k::{Infos, Layout, Module, VecZnx, VmpPMat};
pub struct Ciphertext<T>(pub Elem<T>);
@@ -38,7 +38,7 @@ where
self.elem().size()
}
fn layout(&self) -> LAYOUT {
fn layout(&self) -> Layout {
self.elem().layout()
}

View File

@@ -1,4 +1,4 @@
use base2k::{Infos, LAYOUT, Module, VecZnx, VecZnxOps, VmpPMat, VmpPMatOps};
use base2k::{Infos, Layout, Module, VecZnx, VecZnxOps, VmpPMat, VmpPMatOps};
pub struct Elem<T> {
pub value: Vec<T>,
@@ -71,7 +71,7 @@ pub trait ElemCommon<T> {
fn elem(&self) -> &Elem<T>;
fn elem_mut(&mut self) -> &mut Elem<T>;
fn size(&self) -> usize;
fn layout(&self) -> LAYOUT;
fn layout(&self) -> Layout;
fn rows(&self) -> usize;
fn cols(&self) -> usize;
fn log_base2k(&self) -> usize;
@@ -102,7 +102,7 @@ impl<T: Infos> ElemCommon<T> for Elem<T> {
self.value.len()
}
fn layout(&self) -> LAYOUT {
fn layout(&self) -> Layout {
self.value[0].layout()
}

View File

@@ -1,7 +1,7 @@
use crate::ciphertext::Ciphertext;
use crate::elem::{Elem, ElemCommon, ElemVecZnx};
use crate::parameters::Parameters;
use base2k::{LAYOUT, Module, VecZnx};
use base2k::{Layout, Module, VecZnx};
pub struct Plaintext(pub Elem<VecZnx>);
@@ -79,7 +79,7 @@ impl ElemCommon<VecZnx> for Plaintext {
self.elem().size()
}
fn layout(&self) -> LAYOUT {
fn layout(&self) -> Layout {
self.elem().layout()
}