Skip to content

Commit

Permalink
add imput and output arguments in all docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Oct 7, 2022
1 parent a8eb8bb commit 25f8524
Show file tree
Hide file tree
Showing 34 changed files with 367 additions and 23 deletions.
10 changes: 10 additions & 0 deletions src/bicgstab.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
* H. A. van der Vorst, [*Bi-CGSTAB: A fast and smoothly converging variant of Bi-CG for the solution of nonsymmetric linear systems*](https://doi.org/10.1137/0913035), SIAM Journal on Scientific and Statistical Computing, 13(2), pp. 631--644, 1992.
Expand Down
10 changes: 10 additions & 0 deletions src/bilq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
* A. Montoison and D. Orban, [*BiLQ: An Iterative Method for Nonsymmetric Linear Systems with a Quasi-Minimum Error Property*](https://doi.org/10.1137/19M1290991), SIAM Journal on Matrix Analysis and Applications, 41(3), pp. 1145--1166, 2020.
Expand Down
12 changes: 12 additions & 0 deletions src/bilqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
* `c`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `y`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`AdjointStats`](@ref) structure.
#### Reference
* A. Montoison and D. Orban, [*BiLQ: An Iterative Method for Nonsymmetric Linear Systems with a Quasi-Minimum Error Property*](https://doi.org/10.1137/19M1290991), SIAM Journal on Matrix Analysis and Applications, 41(3), pp. 1145--1166, 2020.
Expand Down
10 changes: 10 additions & 0 deletions src/cg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
* M. R. Hestenes and E. Stiefel, [*Methods of conjugate gradients for solving linear systems*](https://doi.org/10.6028/jres.049.044), Journal of Research of the National Bureau of Standards, 49(6), pp. 409--436, 1952.
Expand Down
10 changes: 10 additions & 0 deletions src/cg_lanczos.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`LanczosStats`](@ref) structure.
#### References
* A. Frommer and P. Maass, [*Fast CG-Based Methods for Tikhonov-Phillips Regularization*](https://doi.org/10.1137/S1064827596313310), SIAM Journal on Scientific Computing, 20(5), pp. 1831--1850, 1999.
Expand Down
16 changes: 16 additions & 0 deletions src/cg_lanczos_shift.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ 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.
* `b`: a vector of length n.
* `shifts`: a vector of length nshifts.
#### Output arguments
* `x`: a vector of nshifts dense vectors, each one of length n.
* `stats`: statistics collected on the run in a [`LanczosShiftStats`](@ref) structure.
#### References
* A. Frommer and P. Maass, [*Fast CG-Based Methods for Tikhonov-Phillips Regularization*](https://doi.org/10.1137/S1064827596313310), SIAM Journal on Scientific Computing, 20(5), pp. 1831--1850, 1999.
* C. C. Paige and M. A. Saunders, [*Solution of Sparse Indefinite Systems of Linear Equations*](https://doi.org/10.1137/0712047), SIAM Journal on Numerical Analysis, 12(4), pp. 617--629, 1975.
"""
function cg_lanczos_shift end

Expand Down
10 changes: 10 additions & 0 deletions src/cgls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ 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 n × m.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length m.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
* M. R. Hestenes and E. Stiefel. [*Methods of conjugate gradients for solving linear systems*](https://doi.org/10.6028/jres.049.044), Journal of Research of the National Bureau of Standards, 49(6), pp. 409--436, 1952.
Expand Down
10 changes: 10 additions & 0 deletions src/cgne.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ 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 n × m.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length m.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
* J. E. Craig, [*The N-step iteration procedures*](https://doi.org/10.1002/sapm195534164), Journal of Mathematics and Physics, 34(1), pp. 64--73, 1955.
Expand Down
10 changes: 10 additions & 0 deletions src/cgs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
* P. Sonneveld, [*CGS, A Fast Lanczos-Type Solver for Nonsymmetric Linear systems*](https://doi.org/10.1137/0910004), SIAM Journal on Scientific and Statistical Computing, 10(1), pp. 36--52, 1989.
Expand Down
10 changes: 10 additions & 0 deletions src/cr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
* M. R. Hestenes and E. Stiefel, [*Methods of conjugate gradients for solving linear systems*](https://doi.org/10.6028/jres.049.044), Journal of Research of the National Bureau of Standards, 49(6), pp. 409--436, 1952.
Expand Down
11 changes: 11 additions & 0 deletions src/craig.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ 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 n × m.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length m.
* `y`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
* C. C. Paige and M. A. Saunders, [*LSQR: An Algorithm for Sparse Linear Equations and Sparse Least Squares*](https://doi.org/10.1145/355984.355989), ACM Transactions on Mathematical Software, 8(1), pp. 43--71, 1982.
Expand Down
11 changes: 11 additions & 0 deletions src/craigmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ 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 n × m.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length m.
* `y`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
* D. Orban and M. Arioli. [*Iterative Solution of Symmetric Quasi-Definite Linear Systems*](https://doi.org/10.1137/1.9781611974737), Volume 3 of Spotlights. SIAM, Philadelphia, PA, 2017.
Expand Down
10 changes: 10 additions & 0 deletions src/crls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ 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 n × m.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length m.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
* D. C.-L. Fong, *Minimum-Residual Methods for Sparse, Least-Squares using Golubg-Kahan Bidiagonalization*, Ph.D. Thesis, Stanford University, 2011.
Expand Down
10 changes: 10 additions & 0 deletions src/crmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ 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 n × m.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length m.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
* D. Orban and M. Arioli, [*Iterative Solution of Symmetric Quasi-Definite Linear Systems*](https://doi.org/10.1137/1.9781611974737), Volume 3 of Spotlights. SIAM, Philadelphia, PA, 2017.
Expand Down
10 changes: 10 additions & 0 deletions src/diom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
* Y. Saad, [*Practical use of some krylov subspace methods for solving indefinite and nonsymmetric linear systems*](https://doi.org/10.1137/0905015), SIAM journal on scientific and statistical computing, 5(1), pp. 203--228, 1984.
Expand Down
10 changes: 10 additions & 0 deletions src/dqgmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
* Y. Saad and K. Wu, [*DQGMRES: a quasi minimal residual algorithm based on incomplete orthogonalization*](https://doi.org/10.1002/(SICI)1099-1506(199607/08)3:4%3C329::AID-NLA86%3E3.0.CO;2-8), Numerical Linear Algebra with Applications, Vol. 3(4), pp. 329--343, 1996.
Expand Down
10 changes: 10 additions & 0 deletions src/fgmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
* Y. Saad, [*A Flexible Inner-Outer Preconditioned GMRES Algorithm*](https://doi.org/10.1137/0914028), SIAM Journal on Scientific Computing, Vol. 14(2), pp. 461--469, 1993.
Expand Down
10 changes: 10 additions & 0 deletions src/fom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
* Y. Saad, [*Krylov subspace methods for solving unsymmetric linear systems*](https://doi.org/10.1090/S0025-5718-1981-0616364-6), Mathematics of computation, Vol. 37(155), pp. 105--126, 1981.
Expand Down
10 changes: 10 additions & 0 deletions src/gmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ where `kwargs` are the same keyword arguments as above.
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.
* `b`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
* Y. Saad and M. H. Schultz, [*GMRES: A Generalized Minimal Residual Algorithm for Solving Nonsymmetric Linear Systems*](https://doi.org/10.1137/0907058), SIAM Journal on Scientific and Statistical Computing, Vol. 7(3), pp. 856--869, 1986.
Expand Down
13 changes: 13 additions & 0 deletions src/gpmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ where `kwargs` are the same keyword arguments as above.
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 × m.
* `B`: a linear operator that models a matrix of dimension m × n.
* `b`: a vector of length n.
* `c`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length n.
* `y`: a dense vector of length m.
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
* A. Montoison and D. Orban, [*GPMR: An Iterative Method for Unsymmetric Partitioned Linear Systems*](https://dx.doi.org/10.13140/RG.2.2.24069.68326), Cahier du GERAD G-2021-62, GERAD, Montréal, 2021.
Expand Down
Loading

0 comments on commit 25f8524

Please sign in to comment.