mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
typo
This commit is contained in:
@@ -3,7 +3,7 @@ use rand_distr::{Distribution, Normal};
|
|||||||
use sampling::source::Source;
|
use sampling::source::Source;
|
||||||
|
|
||||||
pub trait Sampling {
|
pub trait Sampling {
|
||||||
/// Fills the first `limbs` limbs with uniform values in \[-2^{log_base2k}, 2^{log_base2k}\]
|
/// Fills the first `limbs` limbs with uniform values in \[-2^{log_base2k-1}, 2^{log_base2k-1}\]
|
||||||
fn fill_uniform(&mut self, log_base2k: usize, limbs: usize, source: &mut Source);
|
fn fill_uniform(&mut self, log_base2k: usize, limbs: usize, source: &mut Source);
|
||||||
|
|
||||||
/// Adds vector sampled according to the provided distribution, scaled by 2^{-log_k} and bounded to \[-bound, bound\].
|
/// Adds vector sampled according to the provided distribution, scaled by 2^{-log_k} and bounded to \[-bound, bound\].
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::ffi::svp;
|
use crate::ffi::svp;
|
||||||
use crate::{Free, Module, VecZnx, VecZnxDft};
|
use crate::{Module, VecZnx, VecZnxDft};
|
||||||
|
|
||||||
use crate::Infos;
|
use crate::Infos;
|
||||||
use rand::seq::SliceRandom;
|
use rand::seq::SliceRandom;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ pub struct Elem {
|
|||||||
impl Parameters {
|
impl Parameters {
|
||||||
pub fn new_elem(&self, degree: usize, log_q: usize) -> Elem {
|
pub fn new_elem(&self, degree: usize, log_q: usize) -> Elem {
|
||||||
let mut value: Vec<VecZnx> = Vec::new();
|
let mut value: Vec<VecZnx> = Vec::new();
|
||||||
(0..degree + 1).for_each(|_| value.push(VecZnx::new(self.n(), self.log_base2k(), log_q)));
|
(0..degree + 1).for_each(|_| value.push(VecZnx::new(self.n(), log_q)));
|
||||||
Elem {
|
Elem {
|
||||||
value: value,
|
value: value,
|
||||||
log_scale: self.log_scale(),
|
log_scale: self.log_scale(),
|
||||||
|
|||||||
Reference in New Issue
Block a user