From 47078a8a0abdf158e47868cfb030075930c290db Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Wed, 30 Oct 2024 16:06:24 -0500 Subject: [PATCH] Improve the docstrings of Krylov.jl --- src/bicgstab.jl | 10 ++-- src/bilq.jl | 8 ++-- src/bilqr.jl | 14 +++--- src/block_gmres.jl | 8 ++-- src/block_krylov_processes.jl | 80 +++++++++++++++---------------- src/block_krylov_utils.jl | 17 ++++--- src/car.jl | 9 ++-- src/cg.jl | 8 ++-- src/cg_lanczos.jl | 8 ++-- src/cg_lanczos_shift.jl | 8 ++-- src/cgls.jl | 6 +-- src/cgls_lanczos_shift.jl | 8 ++-- src/cgne.jl | 6 +-- src/cgs.jl | 8 ++-- src/cr.jl | 8 ++-- src/craig.jl | 8 ++-- src/craigmr.jl | 8 ++-- src/crls.jl | 6 +-- src/crmr.jl | 6 +-- src/diom.jl | 8 ++-- src/dqgmres.jl | 8 ++-- src/fgmres.jl | 8 ++-- src/fom.jl | 8 ++-- src/gmres.jl | 8 ++-- src/gpmr.jl | 16 +++---- src/krylov_processes.jl | 88 +++++++++++++++++------------------ src/krylov_stats.jl | 2 +- src/lnlq.jl | 8 ++-- src/lslq.jl | 6 +-- src/lsmr.jl | 6 +-- src/lsqr.jl | 6 +-- src/minares.jl | 9 ++-- src/minres.jl | 8 ++-- src/minres_qlp.jl | 8 ++-- src/qmr.jl | 8 ++-- src/symmlq.jl | 8 ++-- src/tricg.jl | 14 +++--- src/trilqr.jl | 14 +++--- src/trimr.jl | 14 +++--- src/usymlq.jl | 10 ++-- src/usymqr.jl | 10 ++-- 41 files changed, 257 insertions(+), 252 deletions(-) diff --git a/src/bicgstab.jl b/src/bicgstab.jl index 4ebba1171..9d0fb66da 100644 --- a/src/bicgstab.jl +++ b/src/bicgstab.jl @@ -25,7 +25,7 @@ export bicgstab, bicgstab! `T` is an `AbstractFloat` such as `Float32`, `Float64` or `BigFloat`. `FC` is `T` or `Complex{T}`. - +"" (x, stats) = bicgstab(A, b, x0::AbstractVector; kwargs...) BICGSTAB can be warm-started from an initial guess `x0` where `kwargs` are the same keyword arguments as above. @@ -44,12 +44,12 @@ BICGSTAB stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -68,7 +68,7 @@ BICGSTAB stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References diff --git a/src/bilq.jl b/src/bilq.jl index 68fde4489..c359bddf5 100644 --- a/src/bilq.jl +++ b/src/bilq.jl @@ -35,12 +35,12 @@ BiLQ requires support for `adjoint(M)` and `adjoint(N)` if preconditioners are p #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -60,7 +60,7 @@ BiLQ requires support for `adjoint(M)` and `adjoint(N)` if preconditioners are p #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References diff --git a/src/bilqr.jl b/src/bilqr.jl index 35df0b98e..c4384aae4 100644 --- a/src/bilqr.jl +++ b/src/bilqr.jl @@ -37,14 +37,14 @@ QMR is used for solving dual system `Aᴴy = c` of size n. #### 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. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`; +* `c`: a vector of length `n`. #### Optional arguments -* `x0`: a vector of length n that represents an initial guess of the solution x; -* `y0`: a vector of length n that represents an initial guess of the solution y. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`; +* `y0`: a vector of length `n` that represents an initial guess of the solution `y`. #### Keyword arguments @@ -60,8 +60,8 @@ QMR is used for solving dual system `Aᴴy = c` of size n. #### Output arguments -* `x`: a dense vector of length n; -* `y`: a dense vector of length n; +* `x`: a dense vector of length `n`; +* `y`: a dense vector of length `n`; * `stats`: statistics collected on the run in an [`AdjointStats`](@ref) structure. #### Reference diff --git a/src/block_gmres.jl b/src/block_gmres.jl index c638fb9e9..997311954 100644 --- a/src/block_gmres.jl +++ b/src/block_gmres.jl @@ -24,12 +24,12 @@ Solve the linear system AX = B of size n with p right-hand sides using block-GMR #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `B`: a matrix of size n × p. +* `A`: a linear operator that models a matrix of dimension `n`; +* `B`: a matrix of size `n × p`. #### Optional argument -* `X0`: a matrix of size n × p that represents an initial guess of the solution X. +* `X0`: a matrix of size `n × p` that represents an initial guess of the solution `X`. #### Keyword arguments @@ -50,7 +50,7 @@ Solve the linear system AX = B of size n with p right-hand sides using block-GMR #### Output arguments -* `X`: a dense matrix of size n × p; +* `X`: a dense matrix of size `n × p`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. """ function block_gmres end diff --git a/src/block_krylov_processes.jl b/src/block_krylov_processes.jl index e4265b448..277dac17a 100644 --- a/src/block_krylov_processes.jl +++ b/src/block_krylov_processes.jl @@ -3,8 +3,8 @@ #### Input arguments -* `A`: a linear operator that models an Hermitian matrix of dimension n; -* `B`: a matrix of size n × p; +* `A`: a linear operator that models an Hermitian matrix of dimension `n`; +* `B`: a matrix of size `n × p`; * `k`: the number of iterations of the block Hermitian Lanczos process. #### Keyword arguments @@ -13,9 +13,9 @@ #### Output arguments -* `V`: a dense n × p(k+1) matrix; -* `Ψ`: a dense p × p upper triangular matrix such that V₁Ψ = B; -* `T`: a sparse p(k+1) × pk block tridiagonal matrix with a bandwidth p. +* `V`: a dense `n × p(k+1)` matrix; +* `Ψ`: a dense `p × p` upper triangular matrix such that `V₁Ψ = B`; +* `T`: a sparse `p(k+1) × pk` block tridiagonal matrix with a bandwidth `p`. """ function hermitian_lanczos(A, B::AbstractMatrix{FC}, k::Int; algo::String="householder") where FC <: FloatOrComplex m, n = size(A) @@ -101,19 +101,19 @@ end #### Input arguments -* `A`: a linear operator that models a square matrix of dimension n; -* `B`: a matrix of size n × p; -* `C`: a matrix of size n × p; +* `A`: a linear operator that models a square matrix of dimension `n`; +* `B`: a matrix of size `n × p`; +* `C`: a matrix of size `n × p`; * `k`: the number of iterations of the block non-Hermitian Lanczos process. #### Output arguments -* `V`: a dense n × p(k+1) matrix; -* `Ψ`: a dense p × p upper triangular matrix such that V₁Ψ = B; -* `T`: a sparse p(k+1) × pk block tridiagonal matrix with a bandwidth p; -* `U`: a dense n × p(k+1) matrix; -* `Φᴴ`: a dense p × p upper triangular matrix such that U₁Φᴴ = C; -* `Tᴴ`: a sparse p(k+1) × pk block tridiagonal matrix with a bandwidth p. +* `V`: a dense `n × p(k+1)` matrix; +* `Ψ`: a dense `p × p` upper triangular matrix such that `V₁Ψ = B`; +* `T`: a sparse `p(k+1) × pk` block tridiagonal matrix with a bandwidth `p`; +* `U`: a dense `n × p(k+1)` matrix; +* `Φᴴ`: a dense `p × p` upper triangular matrix such that `U₁Φᴴ = C`; +* `Tᴴ`: a sparse `p(k+1) × pk` block tridiagonal matrix with a bandwidth `p`. """ function nonhermitian_lanczos(A, B::AbstractMatrix{FC}, C::AbstractMatrix{FC}, k::Int) where FC <: FloatOrComplex m, n = size(A) @@ -231,8 +231,8 @@ end #### Input arguments -* `A`: a linear operator that models a square matrix of dimension n; -* `B`: a matrix of size n × p; +* `A`: a linear operator that models a square matrix of dimension `n`; +* `B`: a matrix of size `n × p`; * `k`: the number of iterations of the block Arnoldi process. #### Keyword arguments @@ -242,9 +242,9 @@ end #### Output arguments -* `V`: a dense n × p(k+1) matrix; -* `Γ`: a dense p × p upper triangular matrix such that V₁Γ = B; -* `H`: a dense p(k+1) × pk block upper Hessenberg matrix with a lower bandwidth p. +* `V`: a dense `n × p(k+1)` matrix; +* `Γ`: a dense `p × p` upper triangular matrix such that `V₁Γ = B`; +* `H`: a dense `p(k+1) × pk` block upper Hessenberg matrix with a lower bandwidth `p`. """ function arnoldi(A, B::AbstractMatrix{FC}, k::Int; algo::String="householder", reorthogonalization::Bool=false) where FC <: FloatOrComplex m, n = size(A) @@ -308,8 +308,8 @@ end #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `B`: a matrix of size m × p; +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `B`: a matrix of size `m × p`; * `k`: the number of iterations of the block Golub-Kahan process. #### Keyword argument @@ -318,10 +318,10 @@ end #### Output arguments -* `V`: a dense n × p(k+1) matrix; -* `U`: a dense m × p(k+1) matrix; -* `Ψ`: a dense p × p upper triangular matrix such that U₁Ψ = B; -* `L`: a sparse p(k+1) × p(k+1) block lower bidiagonal matrix with a lower bandwidth p. +* `V`: a dense `n × p(k+1)` matrix; +* `U`: a dense `m × p(k+1)` matrix; +* `Ψ`: a dense `p × p` upper triangular matrix such that `U₁Ψ = B`; +* `L`: a sparse `p(k+1) × p(k+1)` block lower bidiagonal matrix with a lower bandwidth `p`. """ function golub_kahan(A, B::AbstractMatrix{FC}, k::Int; algo::String="householder") where FC <: FloatOrComplex m, n = size(A) @@ -421,9 +421,9 @@ end #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `B`: a matrix of size m × p; -* `C`: a matrix of size n × p; +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `B`: a matrix of size `m × p`; +* `C`: a matrix of size `n × p`; * `k`: the number of iterations of the block Saunders-Simon-Yip process. #### Keyword argument @@ -432,12 +432,12 @@ end #### Output arguments -* `V`: a dense m × p(k+1) matrix; -* `Ψ`: a dense p × p upper triangular matrix such that V₁Ψ = B; -* `T`: a sparse p(k+1) × pk block tridiagonal matrix with a bandwidth p; -* `U`: a dense n × p(k+1) matrix; -* `Φᴴ`: a dense p × p upper triangular matrix such that U₁Φᴴ = C; -* `Tᴴ`: a sparse p(k+1) × pk block tridiagonal matrix with a bandwidth p. +* `V`: a dense `m × p(k+1)` matrix; +* `Ψ`: a dense `p × p` upper triangular matrix such that `V₁Ψ = B`; +* `T`: a sparse `p(k+1) × pk` block tridiagonal matrix with a bandwidth `p`; +* `U`: a dense `n × p(k+1)` matrix; +* `Φᴴ`: a dense `p × p` upper triangular matrix such that `U₁Φᴴ = C`; +* `Tᴴ`: a sparse `p(k+1) × pk` block tridiagonal matrix with a bandwidth `p`. """ function saunders_simon_yip(A, B::AbstractMatrix{FC}, C::AbstractMatrix{FC}, k::Int; algo::String="householder") where FC <: FloatOrComplex m, n = size(A) @@ -573,12 +573,12 @@ end #### Output arguments -* `V`: a dense m × p(k+1) matrix; -* `Γ`: a dense p × p upper triangular matrix such that V₁Γ = D; -* `H`: a dense p(k+1) × pk block upper Hessenberg matrix with a lower bandwidth p; -* `U`: a dense n × p(k+1) matrix; -* `Λ`: a dense p × p upper triangular matrix such that U₁Λ = C; -* `F`: a dense p(k+1) × pk block upper Hessenberg matrix with a lower bandwidth p. +* `V`: a dense `m × p(k+1)` matrix; +* `Γ`: a dense `p × p` upper triangular matrix such that `V₁Γ = D`; +* `H`: a dense `p(k+1) × pk` block upper Hessenberg matrix with a lower bandwidth `p`; +* `U`: a dense `n × p(k+1)` matrix; +* `Λ`: a dense `p × p` upper triangular matrix such that `U₁Λ = C`; +* `F`: a dense `p(k+1) × pk` block upper Hessenberg matrix with a lower bandwidth `p`. """ function montoison_orban(A, B, D::AbstractMatrix{FC}, C::AbstractMatrix{FC}, k::Int; algo::String="householder", reorthogonalization::Bool=false) where FC <: FloatOrComplex m, n = size(A) diff --git a/src/block_krylov_utils.jl b/src/block_krylov_utils.jl index dae7be166..d402165d2 100644 --- a/src/block_krylov_utils.jl +++ b/src/block_krylov_utils.jl @@ -1,13 +1,16 @@ # """ -# Gram-Schmidt orthogonalization for a reduced QR decomposition: -# Q, R = gs(A) +# Q, R = gs(A) # -# Input : -# A an n-by-k matrix, n ≥ k +# Gram-Schmidt orthogonalization for a reduced QR decomposition. # -# Output : -# Q an n-by-k orthonormal matrix: QᴴQ = Iₖ -# R an k-by-k upper triangular matrix: QR = A +# #### Input argument +# +# * `A`: an n-by-k matrix, n ≥ k +# +# #### Output arguments +# +# * `Q` an n-by-k orthonormal matrix: QᴴQ = Iₖ +# * `R` an k-by-k upper triangular matrix: QR = A # """ function gs(A::AbstractMatrix{FC}) where FC <: FloatOrComplex n, k = size(A) diff --git a/src/car.jl b/src/car.jl index 5d2ed68b6..790d4f61a 100644 --- a/src/car.jl +++ b/src/car.jl @@ -32,12 +32,12 @@ The estimates computed every iteration are ‖Mrₖ‖₂ and ‖AMrₖ‖_M. #### Input arguments -* `A`: a linear operator that models a Hermitian positive definite matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a Hermitian positive definite matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -54,10 +54,11 @@ The estimates computed every iteration are ‖Mrₖ‖₂ and ‖AMrₖ‖_M. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference + * A. Montoison, D. Orban and M. A. Saunders, [*MinAres: An Iterative Solver for Symmetric Linear Systems*](https://doi.org/10.13140/RG.2.2.18163.91683), Cahier du GERAD G-2023-40, GERAD, Montréal, 2023. """ function car end diff --git a/src/cg.jl b/src/cg.jl index f30dc40c9..401d36e79 100644 --- a/src/cg.jl +++ b/src/cg.jl @@ -37,12 +37,12 @@ M also indicates the weighted norm in which residuals are measured. #### Input arguments -* `A`: a linear operator that models a Hermitian positive definite matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a Hermitian positive definite matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -61,7 +61,7 @@ M also indicates the weighted norm in which residuals are measured. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/cg_lanczos.jl b/src/cg_lanczos.jl index 469492b25..47247274c 100644 --- a/src/cg_lanczos.jl +++ b/src/cg_lanczos.jl @@ -34,12 +34,12 @@ The method does _not_ abort if A is not definite. #### Input arguments -* `A`: a linear operator that models a Hermitian matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a Hermitian matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -57,7 +57,7 @@ The method does _not_ abort if A is not definite. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`LanczosStats`](@ref) structure. #### References diff --git a/src/cg_lanczos_shift.jl b/src/cg_lanczos_shift.jl index 9e278ce4e..02997f9b4 100644 --- a/src/cg_lanczos_shift.jl +++ b/src/cg_lanczos_shift.jl @@ -33,9 +33,9 @@ of size n. The method does _not_ abort if A + αI is not definite. #### 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 p. +* `A`: a linear operator that models a Hermitian matrix of dimension `n`; +* `b`: a vector of length `n`; +* `shifts`: a vector of length `p`. #### Keyword arguments @@ -53,7 +53,7 @@ of size n. The method does _not_ abort if A + αI is not definite. #### Output arguments -* `x`: a vector of p dense vectors, each one of length n; +* `x`: a vector of `p` dense vectors, each one of length `n`; * `stats`: statistics collected on the run in a [`LanczosShiftStats`](@ref) structure. #### References diff --git a/src/cgls.jl b/src/cgls.jl index 76c9d7ade..2ee53064b 100644 --- a/src/cgls.jl +++ b/src/cgls.jl @@ -56,8 +56,8 @@ but simpler to implement. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -76,7 +76,7 @@ but simpler to implement. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References diff --git a/src/cgls_lanczos_shift.jl b/src/cgls_lanczos_shift.jl index 02ced4abb..eb07b811f 100644 --- a/src/cgls_lanczos_shift.jl +++ b/src/cgls_lanczos_shift.jl @@ -37,9 +37,9 @@ but simpler to implement. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m; -* `shifts`: a vector of length p. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`; +* `shifts`: a vector of length `p`. #### Keyword arguments @@ -56,7 +56,7 @@ but simpler to implement. #### Output arguments -* `x`: a vector of p dense vectors, each one of length n; +* `x`: a vector of `p` dense vectors, each one of length `n`; * `stats`: statistics collected on the run in a [`LanczosShiftStats`](@ref) structure. #### References diff --git a/src/cgne.jl b/src/cgne.jl index 357691c5f..4b5ee8221 100644 --- a/src/cgne.jl +++ b/src/cgne.jl @@ -63,8 +63,8 @@ but simpler to implement. Only the x-part of the solution is returned. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -82,7 +82,7 @@ but simpler to implement. Only the x-part of the solution is returned. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References diff --git a/src/cgs.jl b/src/cgs.jl index e93d46928..b7ce8db86 100644 --- a/src/cgs.jl +++ b/src/cgs.jl @@ -46,12 +46,12 @@ TFQMR and BICGSTAB were developed to remedy this difficulty.» #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -70,7 +70,7 @@ TFQMR and BICGSTAB were developed to remedy this difficulty.» #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/cr.jl b/src/cr.jl index 0fb897141..d382635c8 100644 --- a/src/cr.jl +++ b/src/cr.jl @@ -39,12 +39,12 @@ M also indicates the weighted norm in which residuals are measured. #### Input arguments -* `A`: a linear operator that models a Hermitian positive definite matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a Hermitian positive definite matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -64,7 +64,7 @@ M also indicates the weighted norm in which residuals are measured. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References diff --git a/src/craig.jl b/src/craig.jl index b331fcfa4..021efea92 100644 --- a/src/craig.jl +++ b/src/craig.jl @@ -91,8 +91,8 @@ In this implementation, both the x and y-parts of the solution are returned. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -115,8 +115,8 @@ In this implementation, both the x and y-parts of the solution are returned. #### Output arguments -* `x`: a dense vector of length n; -* `y`: a dense vector of length m; +* `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. #### References diff --git a/src/craigmr.jl b/src/craigmr.jl index 7628e55a5..933ec861f 100644 --- a/src/craigmr.jl +++ b/src/craigmr.jl @@ -85,8 +85,8 @@ returned. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -106,8 +106,8 @@ returned. #### Output arguments -* `x`: a dense vector of length n; -* `y`: a dense vector of length m; +* `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. #### References diff --git a/src/crls.jl b/src/crls.jl index b9c39db53..89cd749f6 100644 --- a/src/crls.jl +++ b/src/crls.jl @@ -48,8 +48,8 @@ but simpler to implement. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -68,7 +68,7 @@ but simpler to implement. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/crmr.jl b/src/crmr.jl index 73dad4d1a..b0aac785b 100644 --- a/src/crmr.jl +++ b/src/crmr.jl @@ -61,8 +61,8 @@ but simpler to implement. Only the x-part of the solution is returned. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -80,7 +80,7 @@ but simpler to implement. Only the x-part of the solution is returned. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References diff --git a/src/diom.jl b/src/diom.jl index 2c3d2331f..05df11a88 100644 --- a/src/diom.jl +++ b/src/diom.jl @@ -37,12 +37,12 @@ and indefinite systems of linear equations can be handled by this single algorit #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -62,7 +62,7 @@ and indefinite systems of linear equations can be handled by this single algorit #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/dqgmres.jl b/src/dqgmres.jl index 06b78d5e9..f6fa1d6e8 100644 --- a/src/dqgmres.jl +++ b/src/dqgmres.jl @@ -37,12 +37,12 @@ Otherwise, DQGMRES interpolates between MINRES and GMRES and is similar to MINRE #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -62,7 +62,7 @@ Otherwise, DQGMRES interpolates between MINRES and GMRES and is similar to MINRE #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/fgmres.jl b/src/fgmres.jl index 6b5a3a23b..39749fc07 100644 --- a/src/fgmres.jl +++ b/src/fgmres.jl @@ -38,12 +38,12 @@ Thus, GMRES is recommended if the right preconditioner N is constant. #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -64,7 +64,7 @@ Thus, GMRES is recommended if the right preconditioner N is constant. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/fom.jl b/src/fom.jl index 05450862d..9462f3e13 100644 --- a/src/fom.jl +++ b/src/fom.jl @@ -31,12 +31,12 @@ FOM algorithm is based on the Arnoldi process and a Galerkin condition. #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -57,7 +57,7 @@ FOM algorithm is based on the Arnoldi process and a Galerkin condition. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/gmres.jl b/src/gmres.jl index ce07382e8..da636b08b 100644 --- a/src/gmres.jl +++ b/src/gmres.jl @@ -31,12 +31,12 @@ GMRES algorithm is based on the Arnoldi process and computes a sequence of appro #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -57,7 +57,7 @@ GMRES algorithm is based on the Arnoldi process and computes a sequence of appro #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/gpmr.jl b/src/gpmr.jl index 53d13c33a..770d6be6e 100644 --- a/src/gpmr.jl +++ b/src/gpmr.jl @@ -60,15 +60,15 @@ GPMR stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol + #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `B`: a linear operator that models a matrix of dimension n × m; -* `b`: a vector of length m; -* `c`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `B`: a linear operator that models a matrix of dimension `n × m`; +* `b`: a vector of length `m`; +* `c`: a vector of length `n`. #### Optional arguments -* `x0`: a vector of length m that represents an initial guess of the solution x; -* `y0`: a vector of length n that represents an initial guess of the solution y. +* `x0`: a vector of length `m` that represents an initial guess of the solution `x`; +* `y0`: a vector of length `n` that represents an initial guess of the solution `y`. #### Keyword arguments @@ -92,8 +92,8 @@ GPMR stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol + #### Output arguments -* `x`: a dense vector of length m; -* `y`: a dense vector of length n; +* `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. #### Reference diff --git a/src/krylov_processes.jl b/src/krylov_processes.jl index 98fb57b84..b3fcc6efe 100644 --- a/src/krylov_processes.jl +++ b/src/krylov_processes.jl @@ -5,15 +5,15 @@ export hermitian_lanczos, nonhermitian_lanczos, arnoldi, golub_kahan, saunders_s #### Input arguments -* `A`: a linear operator that models an Hermitian matrix of dimension n; -* `b`: a vector of length n; +* `A`: a linear operator that models an Hermitian matrix of dimension `n`; +* `b`: a vector of length `n`; * `k`: the number of iterations of the Hermitian Lanczos process. #### Output arguments -* `V`: a dense n × (k+1) matrix; -* `β`: a coefficient such that βv₁ = b; -* `T`: a sparse (k+1) × k tridiagonal matrix. +* `V`: a dense `n × (k+1)` matrix; +* `β`: a coefficient such that `βv₁ = b`; +* `T`: a sparse `(k+1) × k` tridiagonal matrix. #### Reference @@ -78,19 +78,19 @@ end #### Input arguments -* `A`: a linear operator that models a square matrix of dimension n; -* `b`: a vector of length n; -* `c`: a vector of length n; +* `A`: a linear operator that models a square matrix of dimension `n`; +* `b`: a vector of length `n`; +* `c`: a vector of length `n`; * `k`: the number of iterations of the non-Hermitian Lanczos process. #### Output arguments -* `V`: a dense n × (k+1) matrix; -* `β`: a coefficient such that βv₁ = b; -* `T`: a sparse (k+1) × k tridiagonal matrix; -* `U`: a dense n × (k+1) matrix; -* `γᴴ`: a coefficient such that γᴴu₁ = c; -* `Tᴴ`: a sparse (k+1) × k tridiagonal matrix. +* `V`: a dense `n × (k+1)` matrix; +* `β`: a coefficient such that `βv₁ = b`; +* `T`: a sparse `(k+1) × k` tridiagonal matrix; +* `U`: a dense `n × (k+1)` matrix; +* `γᴴ`: a coefficient such that `γᴴu₁ = c`; +* `Tᴴ`: a sparse `(k+1) × k` tridiagonal matrix. #### Reference @@ -177,8 +177,8 @@ end #### Input arguments -* `A`: a linear operator that models a square matrix of dimension n; -* `b`: a vector of length n; +* `A`: a linear operator that models a square matrix of dimension `n`; +* `b`: a vector of length `n`; * `k`: the number of iterations of the Arnoldi process. #### Keyword argument @@ -187,9 +187,9 @@ end #### Output arguments -* `V`: a dense n × (k+1) matrix; -* `β`: a coefficient such that βv₁ = b; -* `H`: a dense (k+1) × k upper Hessenberg matrix. +* `V`: a dense `n × (k+1)` matrix; +* `β`: a coefficient such that `βv₁ = b`; +* `H`: a dense `(k+1) × k` upper Hessenberg matrix. #### Reference @@ -237,16 +237,16 @@ end #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m; +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`; * `k`: the number of iterations of the Golub-Kahan process. #### Output arguments -* `V`: a dense n × (k+1) matrix; -* `U`: a dense m × (k+1) matrix; -* `β`: a coefficient such that βu₁ = b; -* `L`: a sparse (k+1) × (k+1) lower bidiagonal matrix. +* `V`: a dense `n × (k+1)` matrix; +* `U`: a dense `m × (k+1)` matrix; +* `β`: a coefficient such that `βu₁ = b`; +* `L`: a sparse `(k+1) × (k+1)` lower bidiagonal matrix. #### References @@ -318,19 +318,19 @@ end #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m; -* `c`: a vector of length n; +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`; +* `c`: a vector of length `n`; * `k`: the number of iterations of the Saunders-Simon-Yip process. #### Output arguments -* `V`: a dense m × (k+1) matrix; -* `β`: a coefficient such that βv₁ = b; -* `T`: a sparse (k+1) × k tridiagonal matrix; -* `U`: a dense n × (k+1) matrix; -* `γᴴ`: a coefficient such that γᴴu₁ = c; -* `Tᴴ`: a sparse (k+1) × k tridiagonal matrix. +* `V`: a dense `m × (k+1)` matrix; +* `β`: a coefficient such that `βv₁ = b`; +* `T`: a sparse `(k+1) × k` tridiagonal matrix; +* `U`: a dense `n × (k+1)` matrix; +* `γᴴ`: a coefficient such that `γᴴu₁ = c`; +* `Tᴴ`: a sparse `(k+1) × k` tridiagonal matrix. #### Reference @@ -415,10 +415,10 @@ end #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `B`: a linear operator that models a matrix of dimension n × m; -* `b`: a vector of length m; -* `c`: a vector of length n; +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `B`: a linear operator that models a matrix of dimension `n × m`; +* `b`: a vector of length `m`; +* `c`: a vector of length `n`; * `k`: the number of iterations of the Montoison-Orban process. #### Keyword argument @@ -427,12 +427,12 @@ end #### Output arguments -* `V`: a dense m × (k+1) matrix; -* `β`: a coefficient such that βv₁ = b; -* `H`: a dense (k+1) × k upper Hessenberg matrix; -* `U`: a dense n × (k+1) matrix; -* `γ`: a coefficient such that γu₁ = c; -* `F`: a dense (k+1) × k upper Hessenberg matrix. +* `V`: a dense `m × (k+1)` matrix; +* `β`: a coefficient such that `βv₁ = b`; +* `H`: a dense `(k+1) × k` upper Hessenberg matrix; +* `U`: a dense `n × (k+1)` matrix; +* `γ`: a coefficient such that `γu₁ = c`; +* `F`: a dense `(k+1) × k` upper Hessenberg matrix. #### Reference diff --git a/src/krylov_stats.jl b/src/krylov_stats.jl index 5ea06c18d..c383b7914 100644 --- a/src/krylov_stats.jl +++ b/src/krylov_stats.jl @@ -10,7 +10,7 @@ abstract type KrylovStats{T} end Type for storing statistics returned by the majority of Krylov solvers. The fields are as follows: - `niter`: The total number of iterations completed by the solver; -- `solved`: Indicates whether the solver successfully reached convergence (`true` if solved, ``false` otherwise); +- `solved`: Indicates whether the solver successfully reached convergence (`true` if solved, `false` otherwise); - `inconsistent`: Flags whether the system was detected as inconsistent (i.e., when `b` is not in the range of `A`); - `residuals`: A vector containing the residual norms at each iteration; - `Aresiduals`: A vector of `A'`-residual norms at each iteration; diff --git a/src/lnlq.jl b/src/lnlq.jl index a721be25a..8e9f50c15 100644 --- a/src/lnlq.jl +++ b/src/lnlq.jl @@ -85,8 +85,8 @@ For instance σ:=(1-1e-7)σₘᵢₙ . #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -110,8 +110,8 @@ For instance σ:=(1-1e-7)σₘᵢₙ . #### Output arguments -* `x`: a dense vector of length n; -* `y`: a dense vector of length m; +* `x`: a dense vector of length `n`; +* `y`: a dense vector of length `m`; * `stats`: statistics collected on the run in a [`LNLQStats`](@ref) structure. #### Reference diff --git a/src/lslq.jl b/src/lslq.jl index 0aac95338..3888870f7 100644 --- a/src/lslq.jl +++ b/src/lslq.jl @@ -85,8 +85,8 @@ In this case, `N` can still be specified and indicates the weighted norm in whic #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -113,7 +113,7 @@ In this case, `N` can still be specified and indicates the weighted norm in whic #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`LSLQStats`](@ref) structure. * `stats.err_lbnds` is a vector of lower bounds on the LQ error---the vector is empty if `window` is set to zero diff --git a/src/lsmr.jl b/src/lsmr.jl index 64b91e647..1699f9b1e 100644 --- a/src/lsmr.jl +++ b/src/lsmr.jl @@ -86,8 +86,8 @@ In this case, `N` can still be specified and indicates the weighted norm in whic #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -113,7 +113,7 @@ In this case, `N` can still be specified and indicates the weighted norm in whic #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`LsmrStats`](@ref) structure. #### Reference diff --git a/src/lsqr.jl b/src/lsqr.jl index d980434e1..5ef3e69e0 100644 --- a/src/lsqr.jl +++ b/src/lsqr.jl @@ -82,8 +82,8 @@ In this case, `N` can still be specified and indicates the weighted norm in whic #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`. #### Keyword arguments @@ -109,7 +109,7 @@ In this case, `N` can still be specified and indicates the weighted norm in whic #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/minares.jl b/src/minares.jl index cce6baa41..72dc89539 100644 --- a/src/minares.jl +++ b/src/minares.jl @@ -33,12 +33,12 @@ The estimates computed every iteration are ‖Mrₖ‖₂ and ‖AMrₖ‖_M. #### Input arguments -* `A`: a linear operator that models a Hermitian positive definite matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a Hermitian positive definite matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -57,10 +57,11 @@ The estimates computed every iteration are ‖Mrₖ‖₂ and ‖AMrₖ‖_M. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference + * A. Montoison, D. Orban and M. A. Saunders, [*MinAres: An Iterative Solver for Symmetric Linear Systems*](https://doi.org/10.13140/RG.2.2.18163.91683), Cahier du GERAD G-2023-40, GERAD, Montréal, 2023. """ function minares end diff --git a/src/minres.jl b/src/minres.jl index 2b5f6ce51..9c2ef5c37 100644 --- a/src/minres.jl +++ b/src/minres.jl @@ -56,12 +56,12 @@ MINRES produces monotonic residuals ‖r‖₂ and optimality residuals ‖Aᴴr #### Input arguments -* `A`: a linear operator that models a Hermitian matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a Hermitian matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -82,7 +82,7 @@ MINRES produces monotonic residuals ‖r‖₂ and optimality residuals ‖Aᴴr #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### Reference diff --git a/src/minres_qlp.jl b/src/minres_qlp.jl index abcfbbd59..f981da740 100644 --- a/src/minres_qlp.jl +++ b/src/minres_qlp.jl @@ -39,12 +39,12 @@ M also indicates the weighted norm in which residuals are measured. #### Input arguments -* `A`: a linear operator that models a Hermitian matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a Hermitian matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -63,7 +63,7 @@ M also indicates the weighted norm in which residuals are measured. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References diff --git a/src/qmr.jl b/src/qmr.jl index a05c052c6..d9de5178d 100644 --- a/src/qmr.jl +++ b/src/qmr.jl @@ -42,12 +42,12 @@ QMR requires support for `adjoint(M)` and `adjoint(N)` if preconditioners are pr #### Input arguments -* `A`: a linear operator that models a matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -66,7 +66,7 @@ QMR requires support for `adjoint(M)` and `adjoint(N)` if preconditioners are pr #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References diff --git a/src/symmlq.jl b/src/symmlq.jl index d19559c42..fc28bf667 100644 --- a/src/symmlq.jl +++ b/src/symmlq.jl @@ -38,12 +38,12 @@ SYMMLQ produces monotonic errors ‖x* - x‖₂. #### Input arguments -* `A`: a linear operator that models a Hermitian matrix of dimension n; -* `b`: a vector of length n. +* `A`: a linear operator that models a Hermitian matrix of dimension `n`; +* `b`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -66,7 +66,7 @@ SYMMLQ produces monotonic errors ‖x* - x‖₂. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SymmlqStats`](@ref) structure. #### Reference diff --git a/src/tricg.jl b/src/tricg.jl index 9cd3f0020..d5385fadc 100644 --- a/src/tricg.jl +++ b/src/tricg.jl @@ -54,14 +54,14 @@ TriCG stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol + #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m; -* `c`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`; +* `c`: a vector of length `n`. #### Optional arguments -* `x0`: a vector of length m that represents an initial guess of the solution x; -* `y0`: a vector of length n that represents an initial guess of the solution y. +* `x0`: a vector of length `m` that represents an initial guess of the solution `x`; +* `y0`: a vector of length `n` that represents an initial guess of the solution `y`. #### Keyword arguments @@ -83,8 +83,8 @@ TriCG stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol + #### Output arguments -* `x`: a dense vector of length m; -* `y`: a dense vector of length n; +* `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. #### Reference diff --git a/src/trilqr.jl b/src/trilqr.jl index b609cd914..307fc0b67 100644 --- a/src/trilqr.jl +++ b/src/trilqr.jl @@ -36,14 +36,14 @@ USYMQR is used for solving dual system `Aᴴy = c` of size n × m. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m; -* `c`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`; +* `c`: a vector of length `n`. #### Optional arguments -* `x0`: a vector of length n that represents an initial guess of the solution x; -* `y0`: a vector of length m that represents an initial guess of the solution y. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`; +* `y0`: a vector of length `m` that represents an initial guess of the solution `y`. #### Keyword arguments @@ -59,8 +59,8 @@ USYMQR is used for solving dual system `Aᴴy = c` of size n × m. #### Output arguments -* `x`: a dense vector of length n; -* `y`: a dense vector of length m; +* `x`: a dense vector of length `n`; +* `y`: a dense vector of length `m`; * `stats`: statistics collected on the run in an [`AdjointStats`](@ref) structure. #### Reference diff --git a/src/trimr.jl b/src/trimr.jl index 5093c7beb..6a7d9da06 100644 --- a/src/trimr.jl +++ b/src/trimr.jl @@ -53,14 +53,14 @@ TriMR stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol + #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m; -* `c`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`; +* `c`: a vector of length `n`. #### Optional arguments -* `x0`: a vector of length m that represents an initial guess of the solution x; -* `y0`: a vector of length n that represents an initial guess of the solution y. +* `x0`: a vector of length `m` that represents an initial guess of the solution `x`; +* `y0`: a vector of length `n` that represents an initial guess of the solution `y`. #### Keyword arguments @@ -83,8 +83,8 @@ TriMR stops when `itmax` iterations are reached or when `‖rₖ‖ ≤ atol + #### Output arguments -* `x`: a dense vector of length m; -* `y`: a dense vector of length n; +* `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. #### Reference diff --git a/src/usymlq.jl b/src/usymlq.jl index db7569e4a..18b859fa1 100644 --- a/src/usymlq.jl +++ b/src/usymlq.jl @@ -46,13 +46,13 @@ In all cases, problems must be consistent. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m; -* `c`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`; +* `c`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -68,7 +68,7 @@ In all cases, problems must be consistent. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References diff --git a/src/usymqr.jl b/src/usymqr.jl index 812f30c81..e385ef43f 100644 --- a/src/usymqr.jl +++ b/src/usymqr.jl @@ -50,13 +50,13 @@ USYMQR finds the minimum-norm solution if problems are inconsistent. #### Input arguments -* `A`: a linear operator that models a matrix of dimension m × n; -* `b`: a vector of length m; -* `c`: a vector of length n. +* `A`: a linear operator that models a matrix of dimension `m × n`; +* `b`: a vector of length `m`; +* `c`: a vector of length `n`. #### Optional argument -* `x0`: a vector of length n that represents an initial guess of the solution x. +* `x0`: a vector of length `n` that represents an initial guess of the solution `x`. #### Keyword arguments @@ -71,7 +71,7 @@ USYMQR finds the minimum-norm solution if problems are inconsistent. #### Output arguments -* `x`: a dense vector of length n; +* `x`: a dense vector of length `n`; * `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure. #### References