Skip to content

Commit 5c82c3e

Browse files
docs stdlib/linalg: more RST formatting fixes
1 parent e255b5a commit 5c82c3e

File tree

3 files changed

+117
-116
lines changed

3 files changed

+117
-116
lines changed

base/docs/helpdb.jl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7359,11 +7359,12 @@ doc"""
73597359
Uses :func:`eigs` underneath.
73607360
73617361
Inputs are:
7362-
* ``A``: Linear operator. It can either subtype of ``AbstractArray`` (e.g., sparse matrix) or duck typed. For duck typing ``A`` has to support ``size(A)``, ``eltype(A)``, ``A * vector`` and ``A' * vector``.
7363-
* ``nsv``: Number of singular values.
7364-
* ``ritzvec``: Whether to return the left and right singular vectors ``left_sv`` and ``right_sv``, default is ``true``. If ``false`` the singular vectors are omitted from the output.
7365-
* ``tol``: tolerance, see :func:`eigs`.
7366-
* ``maxiter``: Maximum number of iterations, see :func:`eigs`.
7362+
7363+
* ``A``: Linear operator. It can either subtype of ``AbstractArray`` (e.g., sparse matrix) or duck typed. For duck typing ``A`` has to support ``size(A)``, ``eltype(A)``, ``A * vector`` and ``A' * vector``.
7364+
* ``nsv``: Number of singular values.
7365+
* ``ritzvec``: Whether to return the left and right singular vectors ``left_sv`` and ``right_sv``, default is ``true``. If ``false`` the singular vectors are omitted from the output.
7366+
* ``tol``: tolerance, see :func:`eigs`.
7367+
* ``maxiter``: Maximum number of iterations, see :func:`eigs`.
73677368
73687369
**Example**::
73697370
@@ -7604,14 +7605,13 @@ straight line to the given points `(x, y)`, i.e., such that the squared error
76047605
between `y` and `a + b*x` is minimized.
76057606
76067607
**Example**:
7607-
```
7608-
using PyPlot
7609-
x = [1.0:12.0;]
7610-
y = [5.5, 6.3, 7.6, 8.8, 10.9, 11.79, 13.48, 15.02, 17.77, 20.81, 22.0, 22.99]
7611-
a, b = linreg(x, y) # Linear regression
7612-
plot(x, y, "o") # Plot (x, y) points
7613-
plot(x, [a+b*i for i in x]) # Plot line determined by linear regression
7614-
```
7608+
7609+
using PyPlot
7610+
x = [1.0:12.0;]
7611+
y = [5.5, 6.3, 7.6, 8.8, 10.9, 11.79, 13.48, 15.02, 17.77, 20.81, 22.0, 22.99]
7612+
a, b = linreg(x, y) # Linear regression
7613+
plot(x, y, "o") # Plot (x, y) points
7614+
plot(x, [a+b*i for i in x]) # Plot line determined by linear regression
76157615
"""
76167616
linreg(x,y)
76177617

base/linalg/arnoldi.jl

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@ Computes eigenvalues ``d`` of ``A`` using Lanczos or Arnoldi iterations for
1111
real symmetric or general nonsymmetric matrices respectively.
1212
1313
The following keyword arguments are supported:
14-
* ``nev``: Number of eigenvalues
15-
* ``ncv``: Number of Krylov vectors used in the computation; should satisfy ``nev+1 <= ncv <= n`` for real symmetric problems and ``nev+2 <= ncv <= n`` for other problems, where ``n`` is the size of the input matrix ``A``. The default is ``ncv = max(20,2*nev+1)``.
16-
17-
Note that these restrictions limit the input matrix ``A`` to be of dimension at least 2.
18-
* ``which``: type of eigenvalues to compute. See the note below.
19-
20-
========= ======================================================================================================================
21-
``which`` type of eigenvalues
22-
========= ======================================================================================================================
23-
``:LM`` eigenvalues of largest magnitude (default)
24-
``:SM`` eigenvalues of smallest magnitude
25-
``:LR`` eigenvalues of largest real part
26-
``:SR`` eigenvalues of smallest real part
27-
``:LI`` eigenvalues of largest imaginary part (nonsymmetric or complex ``A`` only)
28-
``:SI`` eigenvalues of smallest imaginary part (nonsymmetric or complex ``A`` only)
29-
``:BE`` compute half of the eigenvalues from each end of the spectrum, biased in favor of the high end. (real symmetric ``A`` only)
30-
========= ======================================================================================================================
31-
32-
* ``tol``: tolerance (:math:`tol \le 0.0` defaults to ``DLAMCH('EPS')``)
33-
* ``maxiter``: Maximum number of iterations (default = 300)
34-
* ``sigma``: Specifies the level shift used in inverse iteration. If ``nothing`` (default), defaults to ordinary (forward) iterations. Otherwise, find eigenvalues close to ``sigma`` using shift and invert iterations.
35-
* ``ritzvec``: Returns the Ritz vectors ``v`` (eigenvectors) if ``true``
36-
* ``v0``: starting vector from which to start the iterations
14+
15+
* ``nev``: Number of eigenvalues
16+
* ``ncv``: Number of Krylov vectors used in the computation; should satisfy ``nev+1 <= ncv <= n`` for real symmetric problems and ``nev+2 <= ncv <= n`` for other problems, where ``n`` is the size of the input matrix ``A``. The default is ``ncv = max(20,2*nev+1)``.
17+
Note that these restrictions limit the input matrix ``A`` to be of dimension at least 2.
18+
* ``which``: type of eigenvalues to compute. See the note below.
19+
20+
========= ======================================================================================================================
21+
``which`` type of eigenvalues
22+
========= ======================================================================================================================
23+
``:LM`` eigenvalues of largest magnitude (default)
24+
``:SM`` eigenvalues of smallest magnitude
25+
``:LR`` eigenvalues of largest real part
26+
``:SR`` eigenvalues of smallest real part
27+
``:LI`` eigenvalues of largest imaginary part (nonsymmetric or complex ``A`` only)
28+
``:SI`` eigenvalues of smallest imaginary part (nonsymmetric or complex ``A`` only)
29+
``:BE`` compute half of the eigenvalues from each end of the spectrum, biased in favor of the high end. (real symmetric ``A`` only)
30+
========= ======================================================================================================================
31+
32+
* ``tol``: tolerance (:math:`tol \le 0.0` defaults to ``DLAMCH('EPS')``)
33+
* ``maxiter``: Maximum number of iterations (default = 300)
34+
* ``sigma``: Specifies the level shift used in inverse iteration. If ``nothing`` (default), defaults to ordinary (forward) iterations. Otherwise, find eigenvalues close to ``sigma`` using shift and invert iterations.
35+
* ``ritzvec``: Returns the Ritz vectors ``v`` (eigenvectors) if ``true``
36+
* ``v0``: starting vector from which to start the iterations
3737
3838
``eigs`` returns the ``nev`` requested eigenvalues in ``d``, the corresponding Ritz vectors ``v`` (only if ``ritzvec=true``), the number of converged eigenvalues ``nconv``, the number of iterations ``niter`` and the number of matrix vector multiplications ``nmult``, as well as the final residual vector ``resid``.
3939
@@ -58,29 +58,29 @@ Computes generalized eigenvalues ``d`` of ``A`` and ``B`` using Lanczos or Arnol
5858
real symmetric or general nonsymmetric matrices respectively.
5959
6060
The following keyword arguments are supported:
61-
* ``nev``: Number of eigenvalues
62-
* ``ncv``: Number of Krylov vectors used in the computation; should satisfy ``nev+1 <= ncv <= n`` for real symmetric problems and ``nev+2 <= ncv <= n`` for other problems, where ``n`` is the size of the input matrices ``A`` and ``B``. The default is ``ncv = max(20,2*nev+1)``.
63-
64-
Note that these restrictions limit the input matrix ``A`` to be of dimension at least 2.
65-
* ``which``: type of eigenvalues to compute. See the note below.
66-
67-
========= ======================================================================================================================
68-
``which`` type of eigenvalues
69-
========= ======================================================================================================================
70-
``:LM`` eigenvalues of largest magnitude (default)
71-
``:SM`` eigenvalues of smallest magnitude
72-
``:LR`` eigenvalues of largest real part
73-
``:SR`` eigenvalues of smallest real part
74-
``:LI`` eigenvalues of largest imaginary part (nonsymmetric or complex ``A`` only)
75-
``:SI`` eigenvalues of smallest imaginary part (nonsymmetric or complex ``A`` only)
76-
``:BE`` compute half of the eigenvalues from each end of the spectrum, biased in favor of the high end. (real symmetric ``A`` only)
77-
========= ======================================================================================================================
78-
79-
* ``tol``: tolerance (:math:`tol \le 0.0` defaults to ``DLAMCH('EPS')``)
80-
* ``maxiter``: Maximum number of iterations (default = 300)
81-
* ``sigma``: Specifies the level shift used in inverse iteration. If ``nothing`` (default), defaults to ordinary (forward) iterations. Otherwise, find eigenvalues close to ``sigma`` using shift and invert iterations.
82-
* ``ritzvec``: Returns the Ritz vectors ``v`` (eigenvectors) if ``true``
83-
* ``v0``: starting vector from which to start the iterations
61+
62+
* ``nev``: Number of eigenvalues
63+
* ``ncv``: Number of Krylov vectors used in the computation; should satisfy ``nev+1 <= ncv <= n`` for real symmetric problems and ``nev+2 <= ncv <= n`` for other problems, where ``n`` is the size of the input matrices ``A`` and ``B``. The default is ``ncv = max(20,2*nev+1)``.
64+
Note that these restrictions limit the input matrix ``A`` to be of dimension at least 2.
65+
* ``which``: type of eigenvalues to compute. See the note below.
66+
67+
========= ======================================================================================================================
68+
``which`` type of eigenvalues
69+
========= ======================================================================================================================
70+
``:LM`` eigenvalues of largest magnitude (default)
71+
``:SM`` eigenvalues of smallest magnitude
72+
``:LR`` eigenvalues of largest real part
73+
``:SR`` eigenvalues of smallest real part
74+
``:LI`` eigenvalues of largest imaginary part (nonsymmetric or complex ``A`` only)
75+
``:SI`` eigenvalues of smallest imaginary part (nonsymmetric or complex ``A`` only)
76+
``:BE`` compute half of the eigenvalues from each end of the spectrum, biased in favor of the high end. (real symmetric ``A`` only)
77+
========= ======================================================================================================================
78+
79+
* ``tol``: tolerance (:math:`tol \le 0.0` defaults to ``DLAMCH('EPS')``)
80+
* ``maxiter``: Maximum number of iterations (default = 300)
81+
* ``sigma``: Specifies the level shift used in inverse iteration. If ``nothing`` (default), defaults to ordinary (forward) iterations. Otherwise, find eigenvalues close to ``sigma`` using shift and invert iterations.
82+
* ``ritzvec``: Returns the Ritz vectors ``v`` (eigenvectors) if ``true``
83+
* ``v0``: starting vector from which to start the iterations
8484
8585
``eigs`` returns the ``nev`` requested eigenvalues in ``d``, the corresponding Ritz vectors ``v`` (only if ``ritzvec=true``), the number of converged eigenvalues ``nconv``, the number of iterations ``niter`` and the number of matrix vector multiplications ``nmult``, as well as the final residual vector ``resid``.
8686

0 commit comments

Comments
 (0)