mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
automorphism gglwe
This commit is contained in:
@@ -6,6 +6,7 @@ use poulpy_hal::{
|
||||
use crate::layouts::{
|
||||
Base2K, Dnum, Dsize, GGLWEInfos, GLWE, GLWEInfos, GLWESwitchingKey, GLWESwitchingKeyAlloc, GLWESwitchingKeyToMut,
|
||||
GLWESwitchingKeyToRef, LWEInfos, Rank, RingDegree, TorusPrecision,
|
||||
prepared::{GetAutomorphismGaloisElement, SetAutomorphismGaloisElement},
|
||||
};
|
||||
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
|
||||
|
||||
@@ -27,6 +28,18 @@ pub struct AutomorphismKey<D: Data> {
|
||||
pub(crate) p: i64,
|
||||
}
|
||||
|
||||
impl<D: DataMut> SetAutomorphismGaloisElement for AutomorphismKey<D> {
|
||||
fn set_p(&mut self, p: i64) {
|
||||
self.p = p
|
||||
}
|
||||
}
|
||||
|
||||
impl<D: DataRef> GetAutomorphismGaloisElement for AutomorphismKey<D> {
|
||||
fn p(&self) -> i64 {
|
||||
self.p
|
||||
}
|
||||
}
|
||||
|
||||
impl<D: Data> AutomorphismKey<D> {
|
||||
pub fn p(&self) -> i64 {
|
||||
self.p
|
||||
|
||||
Reference in New Issue
Block a user