mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
wip
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user