Skip to content

Commit

Permalink
Update the dimension of A
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Oct 7, 2022
1 parent bf37121 commit ff0da24
Show file tree
Hide file tree
Showing 17 changed files with 96 additions and 95 deletions.
8 changes: 4 additions & 4 deletions src/cgls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Solve the regularized linear least-squares problem
minimize ‖b - Ax‖₂² + λ‖x‖₂²
of size n × m using the Conjugate Gradient (CG) method, where λ ≥ 0 is a regularization
of size m × n using the Conjugate Gradient (CG) method, where λ ≥ 0 is a regularization
parameter. This method is equivalent to applying CG to the normal equations
(AᴴA + λI) x = Aᴴb
Expand All @@ -58,12 +58,12 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length m;
* `x`: a dense vector of length n;
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
Expand Down
8 changes: 4 additions & 4 deletions src/cgne.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Solve the consistent linear system
Ax + √λs = b
of size n × m using the Conjugate Gradient (CG) method, where λ ≥ 0 is a regularization
of size m × n using the Conjugate Gradient (CG) method, where λ ≥ 0 is a regularization
parameter. This method is equivalent to applying CG to the normal equations
of the second kind
Expand All @@ -67,12 +67,12 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length m;
* `x`: a dense vector of length n;
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
Expand Down
10 changes: 5 additions & 5 deletions src/craig.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Find the least-norm solution of the consistent linear system
Ax + λ²y = b
of size n × m using the Golub-Kahan implementation of Craig's method, where λ ≥ 0 is a
of size m × n using the Golub-Kahan implementation of Craig's method, where λ ≥ 0 is a
regularization parameter. This method is equivalent to CGNE but is more
stable.
Expand Down Expand Up @@ -91,13 +91,13 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length m;
* `y`: a dense vector of length n;
* `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
Expand Down
10 changes: 5 additions & 5 deletions src/craigmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Solve the consistent linear system
Ax + λ²y = b
of size n × m using the CRAIGMR method, where λ ≥ 0 is a regularization parameter.
of size m × n using the CRAIGMR method, where λ ≥ 0 is a regularization parameter.
This method is equivalent to applying the Conjugate Residuals method
to the normal equations of the second kind
Expand Down Expand Up @@ -87,13 +87,13 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length m;
* `y`: a dense vector of length n;
* `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
Expand Down
8 changes: 4 additions & 4 deletions src/crls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Solve the linear least-squares problem
minimize ‖b - Ax‖₂² + λ‖x‖₂²
of size n × m using the Conjugate Residuals (CR) method.
of size m × n using the Conjugate Residuals (CR) method.
This method is equivalent to applying MINRES to the normal equations
(AᴴA + λI) x = Aᴴb.
Expand All @@ -50,12 +50,12 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length m;
* `x`: a dense vector of length n;
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
Expand Down
8 changes: 4 additions & 4 deletions src/crmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Solve the consistent linear system
Ax + √λs = b
of size n × m using the Conjugate Residual (CR) method, where λ ≥ 0 is a regularization
of size m × n using the Conjugate Residual (CR) method, where λ ≥ 0 is a regularization
parameter. This method is equivalent to applying CR to the normal equations
of the second kind
Expand All @@ -65,12 +65,12 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length m;
* `x`: a dense vector of length n;
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### References
Expand Down
17 changes: 9 additions & 8 deletions src/gpmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ export gpmr, gpmr!
`T` is an `AbstractFloat` such as `Float32`, `Float64` or `BigFloat`.
`FC` is `T` or `Complex{T}`.
Given matrices `A` of dimension m × n and `B` of dimension n × m,
GPMR solves the unsymmetric partitioned linear system
[ λI A ] [ x ] = [ b ]
[ B μI ] [ y ] [ c ],
[ λIₘ A ] [ x ] = [ b ]
[ B μIₙ ] [ y ] [ c ],
of size (n+m) × (n+m) where λ and μ are real or complex numbers.
`A` can have any shape and `B` has the shape of `Aᴴ`.
Expand Down Expand Up @@ -69,15 +70,15 @@ 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.
* `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.
#### Output arguments
* `x`: a dense vector of length n;
* `y`: a dense vector of length m;
* `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
Expand Down
30 changes: 15 additions & 15 deletions src/krylov_processes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ end
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n;
* `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 m × (k+1) matrix;
* `U`: a dense n × (k+1) matrix;
* `V`: a dense n × (k+1) matrix;
* `U`: a dense m × (k+1) matrix;
* `L`: a sparse (k+1) × (k+1) lower bidiagonal matrix.
#### Reference
Expand Down Expand Up @@ -297,16 +297,16 @@ end
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n;
* `c`: a vector of length m;
* `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 n × (k+1) matrix;
* `V`: a dense m × (k+1) matrix;
* `T`: a sparse (k+1) × k tridiagonal matrix;
* `U`: a dense m × (k+1) matrix;
* `U`: a dense n × (k+1) matrix;
* `Tᴴ`: a sparse (k+1) × k tridiagonal matrix.
#### Reference
Expand Down Expand Up @@ -387,17 +387,17 @@ end
#### 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;
* `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.
#### Output arguments
* `V`: a dense n × (k+1) matrix;
* `V`: a dense m × (k+1) matrix;
* `H`: a sparse (k+1) × k upper Hessenberg matrix;
* `U`: a dense m × (k+1) matrix;
* `U`: a dense n × (k+1) matrix;
* `F`: a sparse (k+1) × k upper Hessenberg matrix.
#### Reference
Expand Down
10 changes: 5 additions & 5 deletions src/lnlq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Find the least-norm solution of the consistent linear system
Ax + λ²y = b
of size n × m using the LNLQ method, where λ ≥ 0 is a regularization parameter.
of size m × n using the LNLQ method, where λ ≥ 0 is a regularization parameter.
For a system in the form Ax = b, LNLQ method is equivalent to applying
SYMMLQ to AAᴴy = b and recovering x = Aᴴy but is more stable.
Expand Down Expand Up @@ -84,13 +84,13 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length m;
* `y`: a dense vector of length n;
* `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
Expand Down
8 changes: 4 additions & 4 deletions src/lslq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Solve the regularized linear least-squares problem
minimize ‖b - Ax‖₂² + λ²‖x‖₂²
of size n × m using the LSLQ method, where λ ≥ 0 is a regularization parameter.
of size m × n using the LSLQ method, where λ ≥ 0 is a regularization parameter.
LSLQ is formally equivalent to applying SYMMLQ to the normal equations
(AᴴA + λ²I) x = Aᴴb
Expand Down Expand Up @@ -83,8 +83,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 n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Keyword arguments
Expand All @@ -105,7 +105,7 @@ In this case, `N` can still be specified and indicates the weighted norm in whic
#### Output arguments
* `x`: a dense vector of length m;
* `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
Expand Down
8 changes: 4 additions & 4 deletions src/lsmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Solve the regularized linear least-squares problem
minimize ‖b - Ax‖₂² + λ²‖x‖₂²
of size n × m using the LSMR method, where λ ≥ 0 is a regularization parameter.
of size m × n using the LSMR method, where λ ≥ 0 is a regularization parameter.
LSMR is formally equivalent to applying MINRES to the normal equations
(AᴴA + λ²I) x = Aᴴb
Expand Down Expand Up @@ -90,12 +90,12 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length m;
* `x`: a dense vector of length n;
* `stats`: statistics collected on the run in a [`LsmrStats`](@ref) structure.
#### Reference
Expand Down
8 changes: 4 additions & 4 deletions src/lsqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Solve the regularized linear least-squares problem
minimize ‖b - Ax‖₂² + λ²‖x‖₂²
of size n × m using the LSQR method, where λ ≥ 0 is a regularization parameter.
of size m × n using the LSQR method, where λ ≥ 0 is a regularization parameter.
LSQR is formally equivalent to applying CG to the normal equations
(AᴴA + λ²I) x = Aᴴb
Expand Down Expand Up @@ -85,12 +85,12 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m.
#### Output arguments
* `x`: a dense vector of length m;
* `x`: a dense vector of length n;
* `stats`: statistics collected on the run in a [`SimpleStats`](@ref) structure.
#### Reference
Expand Down
12 changes: 6 additions & 6 deletions src/tricg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export tricg, tricg!
`T` is an `AbstractFloat` such as `Float32`, `Float64` or `BigFloat`.
`FC` is `T` or `Complex{T}`.
TriCG solves the symmetric linear system
Given a matrix `A` of dimension m × n, TriCG solves the symmetric linear system
[ τE A ] [ x ] = [ b ]
[ Aᴴ νF ] [ y ] [ c ],
Expand Down Expand Up @@ -64,14 +64,14 @@ and `false` otherwise.
#### Input arguments
* `A`: a linear operator that models a matrix of dimension n × m;
* `b`: a vector of length n;
* `c`: a vector of length m.
* `A`: a linear operator that models a matrix of dimension m × n;
* `b`: a vector of length m;
* `c`: a vector of length n.
#### Output arguments
* `x`: a dense vector of length n;
* `y`: a dense vector of length m;
* `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
Expand Down
Loading

0 comments on commit ff0da24

Please sign in to comment.