88Discrete Gaussian Samplers over the Integers
99
1010This class realizes oracles which returns integers proportionally to
11- `\e xp( -( x-c) ^ 2/( 2σ ^ 2)) `. All oracles are implemented using rejection sampling.
11+ `\e xp( -( x-c) ^ 2/( 2 \s igma ^ 2)) `. All oracles are implemented using rejection sampling.
1212See :func:`DiscreteGaussianDistributionIntegerSampler. __init__` for which algorithms are
1313available.
1414
@@ -18,7 +18,7 @@ AUTHORS:
1818
1919EXAMPLES:
2020
21- We construct a sampler for the distribution `D_{3,c}` with width `σ =3` and center `c=0`::
21+ We construct a sampler for the distribution `D_{3,c}` with width `\s igma =3` and center `c=0`::
2222
2323 sage: from sage. stats. distributions. discrete_gaussian_integer import DiscreteGaussianDistributionIntegerSampler
2424 sage: sigma = 3. 0
@@ -169,19 +169,19 @@ cdef class DiscreteGaussianDistributionIntegerSampler(SageObject):
169169 INPUT:
170170
171171 - ``sigma`` -- samples `x` are accepted with probability proportional to
172- `\e xp( -( x-c) ²/ ( 2σ² )) `
172+ `\e xp( -( x-c) ^ 2/ ( 2 \s igma ^ 2 )) `
173173
174174 - ``c`` -- the mean of the distribution. The value of ``c`` does not have
175175 to be an integer. However, some algorithms only support integer-valued
176176 ``c`` ( default: ``0``)
177177
178- - ``tau`` -- samples outside the range `( ⌊c⌉-⌈στ ⌉,... ,⌊c⌉+ ⌈στ ⌉) ` are
178+ - ``tau`` -- samples outside the range `( ⌊c⌉-⌈\s igma \t au ⌉,... ,⌊c⌉+ ⌈\s igma \t au ⌉) ` are
179179 considered to have probability zero. This bound applies to algorithms which
180180 sample from the uniform distribution ( default: ``6``)
181181
182182 - ``algorithm`` -- see list below ( default: ``'uniform+ table'`` for
183- `σt ` bounded by ``DiscreteGaussianDistributionIntegerSampler. table_cutoff`` and
184- ``'uniform+ online'`` for bigger `στ `)
183+ `\s igma \t au ` bounded by ``DiscreteGaussianDistributionIntegerSampler. table_cutoff`` and
184+ ``'uniform+ online'`` for bigger `\s igma \t au `)
185185
186186 - ``precision`` -- either ``'mp'`` for multi-precision where the actual
187187 precision used is taken from sigma or ``'dp'`` for double precision. In
@@ -191,27 +191,27 @@ cdef class DiscreteGaussianDistributionIntegerSampler(SageObject):
191191
192192 - ``'uniform+ table'`` -- classical rejection sampling, sampling from the
193193 uniform distribution and accepted with probability proportional to
194- `\e xp( -( x-c) ²/ ( 2σ² )) ` where `\e xp( -( x-c) ²/ ( 2σ² )) ` is precomputed and
194+ `\e xp( -( x-c) ^ 2/ ( 2 \s igma ^ 2 )) ` where `\e xp( -( x-c) ^ 2/ ( 2 \s igma ^ 2 )) ` is precomputed and
195195 stored in a table. Any real-valued `c` is supported.
196196
197197 - ``'uniform+ logtable'`` -- samples are drawn from a uniform distribution and
198- accepted with probability proportional to `\e xp( -( x-c) ²/ ( 2σ² )) ` where
199- `\e xp( -( x-c) ²/ ( 2σ² )) ` is computed using logarithmically many calls to
198+ accepted with probability proportional to `\e xp( -( x-c) ^ 2/ ( 2 \s igma ^ 2 )) ` where
199+ `\e xp( -( x-c) ^ 2/ ( 2 \s igma ^ 2 )) ` is computed using logarithmically many calls to
200200 Bernoulli distributions. See [DDLL2013 ]_ for details. Only
201201 integer-valued `c` are supported.
202202
203203 - ``'uniform+ online'`` -- samples are drawn from a uniform distribution and
204- accepted with probability proportional to `\e xp( -( x-c) ²/ ( 2σ² )) ` where
205- `\e xp( -( x-c) ²/ ( 2σ² )) ` is computed in each invocation. Typically this
204+ accepted with probability proportional to `\e xp( -( x-c) ^ 2/ ( 2 \s igma ^ 2 )) ` where
205+ `\e xp( -( x-c) ^ 2/ ( 2 \s igma ^ 2 )) ` is computed in each invocation. Typically this
206206 is very slow. See [DDLL2013 ]_ for details. Any real-valued `c` is
207207 accepted.
208208
209209 - ``'sigma2+ logtable'`` -- samples are drawn from an easily samplable
210- distribution with `σ = k·σ_2 ` with `σ_2 = \s qrt{1/( 2\l og 2) }` and accepted
211- with probability proportional to `\e xp( -( x-c) ²/ ( 2σ² )) ` where
212- `\e xp( -( x-c) ²/ ( 2σ² )) ` is computed using logarithmically many calls to Bernoulli
210+ distribution with `\s igma = k\c dot \s igma_2 ` with `\s igma_2 = \s qrt{1/( 2\l og 2) }` and accepted
211+ with probability proportional to `\e xp( -( x-c) ^ 2/ ( 2 \s igma ^ 2 )) ` where
212+ `\e xp( -( x-c) ^ 2/ ( 2 \s igma ^ 2 )) ` is computed using logarithmically many calls to Bernoulli
213213 distributions ( but no calls to `\e xp`) . See [DDLL2013 ]_ for details. Note that this
214- sampler adjusts `σ ` to match `k·σ_2 ` for some integer `k`.
214+ sampler adjusts `\s igma ` to match `k\c dot \s igma_2 ` for some integer `k`.
215215 Only integer-valued `c` are supported.
216216
217217 EXAMPLES::
@@ -224,7 +224,7 @@ cdef class DiscreteGaussianDistributionIntegerSampler(SageObject):
224224 sage: DiscreteGaussianDistributionIntegerSampler( 3. 0, algorithm='uniform+ logtable')
225225 Discrete Gaussian sampler over the Integers with sigma = 3. 000000 and c = 0. 000000
226226
227- Note that ``'sigma2+ logtable'`` adjusts `σ `::
227+ Note that ``'sigma2+ logtable'`` adjusts `\s igma `::
228228
229229 sage: DiscreteGaussianDistributionIntegerSampler( 3. 0, algorithm='sigma2+ logtable')
230230 Discrete Gaussian sampler over the Integers with sigma = 3. 397287 and c = 0. 000000
0 commit comments