Skip to content

Commit 916ea36

Browse files
committed
Use LaTeX commands instead of Unicode characters
1 parent 94fe540 commit 916ea36

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/sage/combinat/matrices/dancing_links.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ cdef class dancing_linksWrapper:
886886
Return the SAT solver solving an equivalent problem.
887887
888888
Note that row index `i` in the dancing links solver corresponds to
889-
the boolean variable index `ì+1` for the SAT solver to avoid
889+
the boolean variable index `i+1` for the SAT solver to avoid
890890
the variable index `0`.
891891
892892
See also :mod:`sage.sat.solvers.satsolver`.

src/sage/stats/distributions/discrete_gaussian_integer.pyx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ r"""
88
Discrete Gaussian Samplers over the Integers
99
1010
This class realizes oracles which returns integers proportionally to
11-
`\exp(-(x-c)^2/(^2))`. All oracles are implemented using rejection sampling.
11+
`\exp(-(x-c)^2/(2\sigma^2))`. All oracles are implemented using rejection sampling.
1212
See :func:`DiscreteGaussianDistributionIntegerSampler.__init__` for which algorithms are
1313
available.
1414
@@ -18,7 +18,7 @@ AUTHORS:
1818
1919
EXAMPLES:
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 `\sigma=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-
`\exp(-(x-c)²/(2σ²))`
172+
`\exp(-(x-c)^2/(2\sigma^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⌉-⌈\sigma\tau⌉,...,⌊c⌉+\sigma\tau)` 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+
`\sigma\tau` bounded by ``DiscreteGaussianDistributionIntegerSampler.table_cutoff`` and
184+
``'uniform+online'`` for bigger `\sigma\tau`)
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-
`\exp(-(x-c)²/(2σ²))` where `\exp(-(x-c)²/(2σ²))` is precomputed and
194+
`\exp(-(x-c)^2/(2\sigma^2))` where `\exp(-(x-c)^2/(2\sigma^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 `\exp(-(x-c)²/(2σ²))` where
199-
`\exp(-(x-c)²/(2σ²))` is computed using logarithmically many calls to
198+
accepted with probability proportional to `\exp(-(x-c)^2/(2\sigma^2))` where
199+
`\exp(-(x-c)^2/(2\sigma^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 `\exp(-(x-c)²/(2σ²))` where
205-
`\exp(-(x-c)²/(2σ²))` is computed in each invocation. Typically this
204+
accepted with probability proportional to `\exp(-(x-c)^2/(2\sigma^2))` where
205+
`\exp(-(x-c)^2/(2\sigma^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 = \sqrt{1/(2\log 2)}` and accepted
211-
with probability proportional to `\exp(-(x-c)²/(2σ²))` where
212-
`\exp(-(x-c)²/(2σ²))` is computed using logarithmically many calls to Bernoulli
210+
distribution with `\sigma = k\cdot\sigma_2` with `\sigma_2 = \sqrt{1/(2\log 2)}` and accepted
211+
with probability proportional to `\exp(-(x-c)^2/(2\sigma^2))` where
212+
`\exp(-(x-c)^2/(2\sigma^2))` is computed using logarithmically many calls to Bernoulli
213213
distributions (but no calls to `\exp`). See [DDLL2013]_ for details. Note that this
214-
sampler adjusts `σ` to match `k·σ_2` for some integer `k`.
214+
sampler adjusts `\sigma` to match `k\cdot\sigma_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 `\sigma`::
228228
229229
sage: DiscreteGaussianDistributionIntegerSampler(3.0, algorithm='sigma2+logtable')
230230
Discrete Gaussian sampler over the Integers with sigma = 3.397287 and c = 0.000000

src/sage/stats/distributions/discrete_gaussian_polynomial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
This class realizes oracles which returns polynomials in `\ZZ[x]`
55
where each coefficient is sampled independently with a probability
6-
proportional to `\exp(-(x-c)²/(2σ²))`.
6+
proportional to `\exp(-(x-c)^2/(2\sigma^2))`.
77
88
AUTHORS:
99
@@ -89,7 +89,7 @@ def __init__(self, P, n, sigma):
8989
- ``P`` -- a univariate polynomial ring over the Integers
9090
- ``n`` -- number of coefficients to be sampled
9191
- ``sigma`` -- coefficients `x` are accepted with probability
92-
proportional to `\exp(-x²/(2σ²))`. If an object of type
92+
proportional to `\exp(-x^2/(2\sigma^2))`. If an object of type
9393
:class:`sage.stats.distributions.discrete_gaussian_integer.DiscreteGaussianDistributionIntegerSampler`
9494
is passed, then this sampler is used to sample coefficients.
9595

0 commit comments

Comments
 (0)