Skip to content

Commit d43a17e

Browse files
committed
Implement non-spherical discrete Gaussian sampling
1 parent 7e35966 commit d43a17e

File tree

6 files changed

+276
-51
lines changed

6 files changed

+276
-51
lines changed

src/doc/en/reference/references/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5021,6 +5021,11 @@ REFERENCES:
50215021
small Schroeder paths*, JCTA 125 (2014), 357-378,
50225022
:doi:`10.1016/j.jcta.2014.04.002`
50235023
5024+
.. [Pei2010] Peikert, C. (2010). An Efficient and Parallel Gaussian Sampler for
5025+
Lattices. In: Rabin, T. (eds) Advances in Cryptology – CRYPTO 2010.
5026+
CRYPTO 2010. Lecture Notes in Computer Science, vol 6223. Springer,
5027+
Berlin, Heidelberg. :doi:`10.1007/978-3-642-14623-7_5`
5028+
50245029
.. [Pen2012] \R. Pendavingh, On the evaluation at `(-i, i)` of the
50255030
Tutte polynomial of a binary matroid. Preprint:
50265031
:arxiv:`1203.0910`

src/sage/stats/all.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from .r import ttest
33
from .basic_stats import (mean, mode, std, variance, median, moving_average)
44
from .hmm import all as hmm
5+
from .distributions import (DGI, DGL, DGP)
56

67
# We lazy_import the following modules since they import numpy which
78
# slows down sage startup
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .discrete_gaussian_integer import DGI
2+
from .discrete_gaussian_lattice import DGL
3+
from .discrete_gaussian_polynomial import DGP

src/sage/stats/distributions/discrete_gaussian_integer.pyx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,3 +494,6 @@ cdef class DiscreteGaussianDistributionIntegerSampler(SageObject):
494494
'Discrete Gaussian sampler over the Integers with sigma = 3.000000 and c = 2.000000'
495495
"""
496496
return f"Discrete Gaussian sampler over the Integers with sigma = {self.sigma:.6f} and c = {self.c:.6f}"
497+
498+
499+
DGI = DiscreteGaussianDistributionIntegerSampler

0 commit comments

Comments
 (0)