Skip to content

Commit

Permalink
Check all docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Nov 25, 2022
1 parent 243425e commit 566f23e
Show file tree
Hide file tree
Showing 33 changed files with 15 additions and 214 deletions.
9 changes: 0 additions & 9 deletions src/bicgstab.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ convergence than CGS.
If BICGSTAB stagnates, we recommend DQGMRES and BiLQ as alternative methods for unsymmetric square systems.
BICGSTAB stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol + ‖b‖ * rtol`.
`atol` is an absolute tolerance and `rtol` is a relative tolerance.
Additional details can be displayed if verbose mode is enabled (verbose > 0).
Information will be displayed every `verbose` iterations.
This implementation allows a left preconditioner `M` and a right preconditioner `N`.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
Expand Down
8 changes: 1 addition & 7 deletions src/bilq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@ BiLQ can be warm-started from an initial guess `x0` where `kwargs` are the same
Solve the square linear system Ax = b of size n using BiLQ.
BiLQ is based on the Lanczos biorthogonalization process and requires two initial vectors `b` and `c`.
The relation `bᴴc ≠ 0` must be satisfied and by default `c = b`.
When `A` is symmetric and `b = c`, BiLQ is equivalent to SYMMLQ.
An option gives the possibility of transferring to the BiCG point,
when it exists. The transfer is based on the residual norm.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
When `A` is Hermitian and `b = c`, BiLQ is equivalent to SYMMLQ.
#### Input arguments
Expand Down
6 changes: 0 additions & 6 deletions src/bilqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ The relation `bᴴc ≠ 0` must be satisfied.
BiLQ is used for solving primal system `Ax = b` of size n.
QMR is used for solving dual system `Aᴴy = c` of size n.
An option gives the possibility of transferring from the BiLQ point to the
BiCG point, when it exists. The transfer is based on the residual norm.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n;
Expand Down
8 changes: 0 additions & 8 deletions src/cg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,8 @@ CG can be warm-started from an initial guess `x0` where `kwargs` are the same ke
The conjugate gradient method to solve the Hermitian linear system Ax = b of size n.
The method does _not_ abort if A is not definite.
A preconditioner M may be provided in the form of a linear operator and is
assumed to be Hermitian and positive definite.
M also indicates the weighted norm in which residuals are measured.
If `itmax=0`, the default number of iterations is set to `2 * n`.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a Hermitian positive definite matrix of dimension n;
Expand Down
6 changes: 0 additions & 6 deletions src/cg_lanczos.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ Hermitian linear system Ax = b of size n.
The method does _not_ abort if A is not definite.
A preconditioner M may be provided in the form of a linear operator and is
assumed to be Hermitian and positive definite.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a Hermitian matrix of dimension n;
Expand Down
6 changes: 0 additions & 6 deletions src/cg_lanczos_shift.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ of shifted systems
of size n. The method does _not_ abort if A + αI is not definite.
A preconditioner M may be provided in the form of a linear operator and is
assumed to be Hermitian and positive definite.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a Hermitian matrix of dimension n;
Expand Down
3 changes: 0 additions & 3 deletions src/cgls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ CGLS produces monotonic residuals ‖r‖₂ but not optimality residuals ‖A
It is formally equivalent to LSQR, though can be slightly less accurate,
but simpler to implement.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
5 changes: 0 additions & 5 deletions src/cgne.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ CGNE produces monotonic errors ‖x-x*‖₂ but not residuals ‖r‖₂.
It is formally equivalent to CRAIG, though can be slightly less accurate,
but simpler to implement. Only the x-part of the solution is returned.
A preconditioner N may be provided in the form of a linear operator.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
5 changes: 0 additions & 5 deletions src/cgs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ to become inaccurate.
TFQMR and BICGSTAB were developed to remedy this difficulty.»
This implementation allows a left preconditioner M and a right preconditioner N.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n;
Expand Down
9 changes: 0 additions & 9 deletions src/cr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,8 @@ CR can be warm-started from an initial guess `x0` where `kwargs` are the same ke
A truncated version of Stiefel’s Conjugate Residual method to solve the Hermitian linear system Ax = b
of size n or the least-squares problem min ‖b - Ax‖ if A is singular.
The matrix A must be Hermitian semi-definite.
A preconditioner M may be provided in the form of a linear operator and is assumed to be Hermitian and positive definite.
M also indicates the weighted norm in which residuals are measured.
In a linesearch context, 'linesearch' must be set to 'true'.
If `itmax=0`, the default number of iterations is set to `2 * n`.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a Hermitian positive definite matrix of dimension n;
Expand Down
3 changes: 0 additions & 3 deletions src/craig.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ In this case, `M` can still be specified and indicates the weighted norm in whic
In this implementation, both the x and y-parts of the solution are returned.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
3 changes: 0 additions & 3 deletions src/craigmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ It is formally equivalent to CRMR, though can be slightly more accurate,
and intricate to implement. Both the x- and y-parts of the solution are
returned.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
3 changes: 0 additions & 3 deletions src/crls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ CRLS produces monotonic residuals ‖r‖₂ and optimality residuals ‖Aᴴr
It is formally equivalent to LSMR, though can be substantially less accurate,
but simpler to implement.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
5 changes: 0 additions & 5 deletions src/crmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ CRMR produces monotonic residuals ‖r‖₂.
It is formally equivalent to CRAIG-MR, though can be slightly less accurate,
but simpler to implement. Only the x-part of the solution is returned.
A preconditioner N may be provided.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
9 changes: 1 addition & 8 deletions src/diom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,9 @@ If CG is well defined on `Ax = b` and `memory = 2`, DIOM is theoretically equiva
If `k ≤ memory` where `k` is the number of iterations, DIOM is theoretically equivalent to FOM.
Otherwise, DIOM interpolates between CG and FOM and is similar to CG with partial reorthogonalization.
Partial reorthogonalization is available with the `reorthogonalization` option.
An advantage of DIOM is that nonsymmetric or symmetric indefinite or both nonsymmetric
An advantage of DIOM is that non-Hermitian or Hermitian indefinite or both non-Hermitian
and indefinite systems of linear equations can be handled by this single algorithm.
This implementation allows a left preconditioner M and a right preconditioner N.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n;
Expand Down
7 changes: 0 additions & 7 deletions src/dqgmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ If MINRES is well defined on `Ax = b` and `memory = 2`, DQGMRES is theoretically
If `k ≤ memory` where `k` is the number of iterations, DQGMRES is theoretically equivalent to GMRES.
Otherwise, DQGMRES interpolates between MINRES and GMRES and is similar to MINRES with partial reorthogonalization.
Partial reorthogonalization is available with the `reorthogonalization` option.
This implementation allows a left preconditioner M and a right preconditioner N.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n;
Expand Down
9 changes: 0 additions & 9 deletions src/fgmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ a Chebyshev iteration or another Krylov subspace method is used as a preconditio
Compared to GMRES, there is no additional cost incurred in the arithmetic but the memory requirement almost doubles.
Thus, GMRES is recommended if the right preconditioner N is constant.
Full reorthogonalization is available with the `reorthogonalization` option.
If `restart = true`, the restarted version FGMRES(k) is used with `k = memory`.
If `restart = false`, the parameter `memory` should be used as a hint of the number of iterations to limit dynamic memory allocations.
More storage will be allocated only if the number of iterations exceeds `memory`.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n;
Expand Down
10 changes: 0 additions & 10 deletions src/fom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ Solve the linear system Ax = b of size n using FOM.
FOM algorithm is based on the Arnoldi process and a Galerkin condition.
This implementation allows a left preconditioner M and a right preconditioner N.
Full reorthogonalization is available with the `reorthogonalization` option.
If `restart = true`, the restarted version FOM(k) is used with `k = memory`.
If `restart = false`, the parameter `memory` should be used as a hint of the number of iterations to limit dynamic memory allocations.
More storage will be allocated only if the number of iterations exceeds `memory`.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n;
Expand Down
10 changes: 0 additions & 10 deletions src/gmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ Solve the linear system Ax = b of size n using GMRES.
GMRES algorithm is based on the Arnoldi process and computes a sequence of approximate solutions with the minimum residual.
This implementation allows a left preconditioner M and a right preconditioner N.
Full reorthogonalization is available with the `reorthogonalization` option.
If `restart = true`, the restarted version GMRES(k) is used with `k = memory`.
If `restart = false`, the parameter `memory` should be used as a hint of the number of iterations to limit dynamic memory allocations.
More storage will be allocated only if the number of iterations exceeds `memory`.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n;
Expand Down
12 changes: 1 addition & 11 deletions src/gpmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export gpmr, gpmr!
GPMR can be warm-started from initial guesses `x0` and `y0` where `kwargs` are the same keyword arguments as above.
Given matrices `A` of dimension m × n and `B` of dimension n × m,
GPMR solves the unsymmetric partitioned linear system
GPMR solves the non-Hermitian partitioned linear system
[ λIₘ A ] [ x ] = [ b ]
[ B μIₙ ] [ y ] [ c ],
Expand All @@ -51,23 +51,13 @@ and can solve
when `CE = M⁻¹` and `DF = N⁻¹`.
By default, GPMR solves unsymmetric linear systems with `λ = 1` and `μ = 1`.
If `gsp = true`, `λ = 1`, `μ = 0` and the associated generalized saddle point system is solved.
`λ` and `μ` are also keyword arguments that can be directly modified for more specific problems.
GPMR is based on the orthogonal Hessenberg reduction process and its relations with the block-Arnoldi process.
The residual norm ‖rₖ‖ is monotonically decreasing in GPMR.
GPMR stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol + ‖r₀‖ * rtol`.
`atol` is an absolute tolerance and `rtol` is a relative tolerance.
Full reorthogonalization is available with the `reorthogonalization` option.
Additional details can be displayed if verbose mode is enabled (verbose > 0).
Information will be displayed every `verbose` iterations.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
3 changes: 0 additions & 3 deletions src/lnlq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ In this implementation, both the x and y-parts of the solution are returned.
The bound is valid if λ>0 or σ>0 where σ should be strictly smaller than the smallest positive singular value.
For instance σ:=(1-1e-7)σₘᵢₙ .
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
19 changes: 8 additions & 11 deletions src/lslq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ LSLQ is formally equivalent to applying SYMMLQ to the normal equations
but is more stable.
#### Main features
* the solution estimate is updated along orthogonal directions
* the norm of the solution estimate ‖xᴸₖ‖₂ is increasing
* the error ‖eₖ‖₂ := ‖xᴸₖ - x*‖₂ is decreasing
* it is possible to transition cheaply from the LSLQ iterate to the LSQR iterate if there is an advantage (there always is in terms of error)
* if `A` is rank deficient, identify the minimum least-squares solution
If `λ > 0`, we solve the symmetric and quasi-definite system
[ E A ] [ r ] [ b ]
Expand Down Expand Up @@ -83,6 +75,14 @@ The system above represents the optimality conditions of
In this case, `N` can still be specified and indicates the weighted norm in which `x` and `Aᴴr` should be measured.
`r` can be recovered by computing `E⁻¹(b - Ax)`.
#### Main features
* the solution estimate is updated along orthogonal directions
* the norm of the solution estimate ‖xᴸₖ‖₂ is increasing
* the error ‖eₖ‖₂ := ‖xᴸₖ - x*‖₂ is decreasing
* it is possible to transition cheaply from the LSLQ iterate to the LSQR iterate if there is an advantage (there always is in terms of error)
* if `A` is rank deficient, identify the minimum least-squares solution
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down Expand Up @@ -136,9 +136,6 @@ The iterations stop as soon as one of the following conditions holds true:
* the lower bound on the LQ forward error is less than etol * ‖xᴸ‖
* the upper bound on the CG forward error is less than utol * ‖xᶜ‖
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### References
* R. Estrin, D. Orban and M. A. Saunders, [*Euclidean-norm error bounds for SYMMLQ and CG*](https://doi.org/10.1137/16M1094816), SIAM Journal on Matrix Analysis and Applications, 40(1), pp. 235--253, 2019.
Expand Down
3 changes: 0 additions & 3 deletions src/lsmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ The system above represents the optimality conditions of
In this case, `N` can still be specified and indicates the weighted norm in which `x` and `Aᴴr` should be measured.
`r` can be recovered by computing `E⁻¹(b - Ax)`.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
3 changes: 0 additions & 3 deletions src/lsqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ The system above represents the optimality conditions of
In this case, `N` can still be specified and indicates the weighted norm in which `x` and `Aᴴr` should be measured.
`r` can be recovered by computing `E⁻¹(b - Ax)`.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension m × n;
Expand Down
6 changes: 0 additions & 6 deletions src/minres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ A is indefinite.
MINRES produces monotonic residuals ‖r‖₂ and optimality residuals ‖Aᴴr‖₂.
A preconditioner M may be provided in the form of a linear operator and is
assumed to be Hermitian and positive definite.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a Hermitian matrix of dimension n;
Expand Down
5 changes: 0 additions & 5 deletions src/minres_qlp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,8 @@ MINRES-QLP is the only method based on the Lanczos process that returns the mini
solution on singular inconsistent systems (A + λI)x = b of size n, where λ is a shift parameter.
It is significantly more complex but can be more reliable than MINRES when A is ill-conditioned.
A preconditioner M may be provided in the form of a linear operator and is
assumed to be Hermitian and positive definite.
M also indicates the weighted norm in which residuals are measured.
The callback is called as `callback(solver)` and should return `true` if the main loop should terminate,
and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a Hermitian matrix of dimension n;
Expand Down
Loading

0 comments on commit 566f23e

Please sign in to comment.