mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 21:26:41 +01:00
amend rlwe_encrypt example and minor changes at multiple places
This commit is contained in:
@@ -217,7 +217,7 @@ pub type VecZnxMut<'a> = VecZnx<&'a mut [u8]>;
|
||||
pub type VecZnxRef<'a> = VecZnx<&'a [u8]>;
|
||||
|
||||
impl VecZnx<Vec<u8>> {
|
||||
pub(crate) fn to_mut(&mut self) -> VecZnx<&mut [u8]> {
|
||||
pub fn to_mut(&mut self) -> VecZnx<&mut [u8]> {
|
||||
VecZnx {
|
||||
data: self.data.as_mut_slice(),
|
||||
n: self.n,
|
||||
@@ -226,7 +226,7 @@ impl VecZnx<Vec<u8>> {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn to_ref(&self) -> VecZnx<&[u8]> {
|
||||
pub fn to_ref(&self) -> VecZnx<&[u8]> {
|
||||
VecZnx {
|
||||
data: self.data.as_slice(),
|
||||
n: self.n,
|
||||
@@ -235,3 +235,14 @@ impl VecZnx<Vec<u8>> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl VecZnx<&mut [u8]> {
|
||||
pub fn to_ref(&self) -> VecZnx<&[u8]> {
|
||||
VecZnx {
|
||||
data: &self.data,
|
||||
n: self.n,
|
||||
cols: self.cols,
|
||||
size: self.size,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user