mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
VecZnx: added ring degree switching
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::Module;
|
||||
use rand::seq::SliceRandom;
|
||||
use rand_core::RngCore;
|
||||
use rand_distr::{Distribution, WeightedIndex};
|
||||
@@ -5,6 +6,12 @@ use sampling::source::Source;
|
||||
|
||||
pub struct Scalar(pub Vec<i64>);
|
||||
|
||||
impl Module {
|
||||
pub fn new_scalar(&self) -> Scalar {
|
||||
Scalar::new(self.n())
|
||||
}
|
||||
}
|
||||
|
||||
impl Scalar {
|
||||
pub fn new(n: usize) -> Self {
|
||||
Self(vec![i64::default(); Self::buffer_size(n)])
|
||||
|
||||
Reference in New Issue
Block a user