diff --git a/ext/krylov_processes.jl b/ext/krylov_processes.jl index b016bbc33..616a40a5c 100644 --- a/ext/krylov_processes.jl +++ b/ext/krylov_processes.jl @@ -23,8 +23,8 @@ * C. Lanczos, [*An Iteration Method for the Solution of the Eigenvalue Problem of Linear Differential and Integral Operators*](https://doi.org/10.6028/jres.045.026), Journal of Research of the National Bureau of Standards, 45(4), pp. 225--280, 1950. * H. D. Simon, [*The Lanczos algorithm with partial reorthogonalization*](https://doi.org/10.1090/S0025-5718-1984-0725988-X), Mathematics of computation, 42(165), pp. 115--142, 1984. """ -function hermitian_lanczos(A, b::AbstractVector{FC}, k::Int; - allow_breakdown::Bool=false, reorthogonalization::Bool=false) where FC <: FloatOrComplex +function Krylov.hermitian_lanczos(A, b::AbstractVector{FC}, k::Int; + allow_breakdown::Bool=false, reorthogonalization::Bool=false) where FC <: FloatOrComplex m, n = size(A) R = real(FC) S = ktypeof(b) @@ -128,8 +128,8 @@ end * C. Lanczos, [*An Iteration Method for the Solution of the Eigenvalue Problem of Linear Differential and Integral Operators*](https://doi.org/10.6028/jres.045.026), Journal of Research of the National Bureau of Standards, 45(4), pp. 225--280, 1950. * H. I. van der Veen and K. Vuik, [*Bi-Lanczos with partial orthogonalization*](https://doi.org/10.1016/0045-7949(94)00565-K), Computers & structures, 56(4), pp. 605--613, 1995. """ -function nonhermitian_lanczos(A, b::AbstractVector{FC}, c::AbstractVector{FC}, k::Int; - allow_breakdown::Bool=false) where FC <: FloatOrComplex +function Krylov.nonhermitian_lanczos(A, b::AbstractVector{FC}, c::AbstractVector{FC}, k::Int; + allow_breakdown::Bool=false) where FC <: FloatOrComplex m, n = size(A) Aᴴ = A' R = real(FC) @@ -247,8 +247,8 @@ end * G. H. Golub and W. Kahan, [*Calculating the Singular Values and Pseudo-Inverse of a Matrix*](https://doi.org/10.1137/0702016), SIAM Journal on Numerical Analysis, 2(2), pp. 225--224, 1965. * C. C. Paige, [*Bidiagonalization of Matrices and Solution of Linear Equations*](https://doi.org/10.1137/0711019), SIAM Journal on Numerical Analysis, 11(1), pp. 197--209, 1974. """ -function golub_kahan(A, b::AbstractVector{FC}, k::Int; - allow_breakdown::Bool=false) where FC <: FloatOrComplex +function Krylov.golub_kahan(A, b::AbstractVector{FC}, k::Int; + allow_breakdown::Bool=false) where FC <: FloatOrComplex m, n = size(A) R = real(FC) Aᴴ = A' @@ -355,8 +355,8 @@ end * M. A. Saunders, H. D. Simon, and E. L. Yip, [*Two Conjugate-Gradient-Type Methods for Unsymmetric Linear Equations*](https://doi.org/10.1137/0725052), SIAM Journal on Numerical Analysis, 25(4), pp. 927--940, 1988. """ -function saunders_simon_yip(A, b::AbstractVector{FC}, c::AbstractVector{FC}, k::Int; - allow_breakdown::Bool=false) where FC <: FloatOrComplex +function Krylov.saunders_simon_yip(A, b::AbstractVector{FC}, c::AbstractVector{FC}, k::Int; + allow_breakdown::Bool=false) where FC <: FloatOrComplex m, n = size(A) Aᴴ = A' R = real(FC) diff --git a/src/krylov_processes.jl b/src/krylov_processes.jl index 547f13f58..c0caf2c19 100644 --- a/src/krylov_processes.jl +++ b/src/krylov_processes.jl @@ -1,13 +1,13 @@ export hermitian_lanczos, nonhermitian_lanczos, arnoldi, golub_kahan, saunders_simon_yip, montoison_orban -function nonhermitian_lanczos(args...; kwargs...) - error("The function `nonhermitian_lanczos` requires the package SparseArrays. Add `using SparseArrays` to your code.\nIf SparseArrays is already loaded, check the provided arguments.") -end - function hermitian_lanczos(args...; kwargs...) error("The function `hermitian_lanczos` requires the package SparseArrays. Add `using SparseArrays` to your code.\nIf SparseArrays is already loaded, check the provided arguments.") end +function nonhermitian_lanczos(args...; kwargs...) + error("The function `nonhermitian_lanczos` requires the package SparseArrays. Add `using SparseArrays` to your code.\nIf SparseArrays is already loaded, check the provided arguments.") +end + function golub_kahan(args...; kwargs...) error("The function `golub_kahan` requires the package SparseArrays. Add `using SparseArrays` to your code.\nIf SparseArrays is already loaded, check the provided arguments.") end