Stats Types

Krylov.SimpleStatsType

Type for storing statistics returned by the majority of (block) 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);
  • inconsistent: Flags whether the system was detected as inconsistent (i.e., when b is not in the range of A);
  • indefinite: Flags whether the system was detected as indefinite (i.e., when A is not positive definite);
  • npcCount: The number of nonpositive curvature directions encountered during the solve;
  • residuals: A vector containing the residual norms at each iteration;
  • Aresiduals: A vector of A'-residual norms at each iteration;
  • Acond: An estimate of the condition number of matrix A.
  • timer: The elapsed time (in seconds) taken by the solver to complete all iterations;
  • status: A string indicating the outcome of the solve, providing additional details beyond solved.
source
Krylov.LanczosStatsType

Type for storing statistics returned by CG-LANCZOS. The fields are as follows:

  • niter
  • solved
  • residuals
  • indefinite
  • Anorm
  • Acond
  • timer
  • status
source
Krylov.LanczosShiftStatsType

Type for storing statistics returned by CG-LANCZOS-SHIFT and CGLS-LANCZOS-SHIFT. The fields are as follows:

  • niter
  • solved
  • residuals
  • indefinite
  • Anorm
  • Acond
  • timer
  • status
source
Krylov.SymmlqStatsType

Type for storing statistics returned by SYMMLQ. The fields are as follows:

  • niter
  • solved
  • residuals
  • residualscg
  • errors
  • errorscg
  • Anorm
  • Acond
  • timer
  • status
source
Krylov.AdjointStatsType

Type for storing statistics returned by adjoint systems solvers BiLQR and TriLQR. The fields are as follows:

  • niter
  • solved_primal
  • solved_dual
  • residuals_primal
  • residuals_dual
  • timer
  • status
source
Krylov.LNLQStatsType

Type for storing statistics returned by the LNLQ method. The fields are as follows:

  • niter
  • solved
  • residuals
  • errorwithbnd
  • errorbndx
  • errorbndy
  • timer
  • status
source
Krylov.LSLQStatsType

Type for storing statistics returned by the LSLQ method. The fields are as follows:

  • niter
  • solved
  • inconsistent
  • residuals
  • Aresiduals
  • err_lbnds
  • errorwithbnd
  • errubndslq
  • errubndscg
  • timer
  • status
source
Krylov.LsmrStatsType

Type for storing statistics returned by LSMR. The fields are as follows:

  • niter
  • solved
  • inconsistent
  • residuals
  • Aresiduals
  • Acond
  • Anorm
  • xNorm
  • timer
  • status
source

Workspace of Krylov methods

Krylov.MinresWorkspaceType

Workspace for the in-place methods minres! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = MinresWorkspace(m, n, S; window = 5)
workspace = MinresWorkspace(A, b; window = 5)
workspace = MinresWorkspace(kc::KrylovConstructor{S,S}; window = 5)

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.MinaresWorkspaceType

Workspace for the in-place methods minares! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = MinaresWorkspace(m, n, S)
workspace = MinaresWorkspace(A, b)
workspace = MinaresWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.CgWorkspaceType

Workspace for the in-place methods cg! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CgWorkspace(m, n, S)
workspace = CgWorkspace(A, b)
workspace = CgWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.CrWorkspaceType

Workspace for the in-place methods cr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CrWorkspace(m, n, S)
workspace = CrWorkspace(A, b)
workspace = CrWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.CarWorkspaceType

Workspace for the in-place methods car! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CarWorkspace(m, n, S)
workspace = CarWorkspace(A, b)
workspace = CarWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.SymmlqWorkspaceType

Workspace for the in-place methods symmlq! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = SymmlqWorkspace(m, n, S)
workspace = SymmlqWorkspace(A, b)
workspace = SymmlqWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.CgLanczosWorkspaceType

Workspace for the in-place methods cg_lanczos! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CgLanczosWorkspace(m, n, S)
workspace = CgLanczosWorkspace(A, b)
workspace = CgLanczosWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.CgLanczosShiftWorkspaceType

Workspace for the in-place methods cg_lanczos_shift! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CgLanczosShiftWorkspace(m, n, nshifts, S)
workspace = CgLanczosShiftWorkspace(A, b, nshifts)
workspace = CgLanczosShiftWorkspace(kc::KrylovConstructor{S,S}, nshifts)

m and n denote the dimensions of the linear operator A passed to the in-place methods. nshifts denotes the length of the vector shifts passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.MinresQlpWorkspaceType

Workspace for the in-place methods minres_qlp! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = MinresQlpWorkspace(m, n, S)
workspace = MinresQlpWorkspace(A, b)
workspace = MinresQlpWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.DiomWorkspaceType

Workspace for the in-place methods diom! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = DiomWorkspace(m, n, S; memory = 20)
workspace = DiomWorkspace(A, b; memory = 20)
workspace = DiomWorkspace(kc::KrylovConstructor{S,S}; memory = 20)

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}. memory is set to n if the value given is larger than n.

source
Krylov.FomWorkspaceType

Workspace for the in-place methods fom! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = FomWorkspace(m, n, S; memory = 20)
workspace = FomWorkspace(A, b; memory = 20)
workspace = FomWorkspace(kc::KrylovConstructor{S,S}; memory = 20)

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}. memory is set to n if the value given is larger than n.

source
Krylov.DqgmresWorkspaceType

Workspace for the in-place methods dqgmres! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = DqgmresWorkspace(m, n, S; memory = 20)
workspace = DqgmresWorkspace(A, b; memory = 20)
workspace = DqgmresWorkspace(kc::KrylovConstructor{S,S}; memory = 20)

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}. memory is set to n if the value given is larger than n.

source
Krylov.GmresWorkspaceType

Workspace for the in-place methods gmres! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = GmresWorkspace(m, n, S; memory = 20)
workspace = GmresWorkspace(A, b; memory = 20)
workspace = GmresWorkspace(kc::KrylovConstructor{S,S}; memory = 20)

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}. memory is set to n if the value given is larger than n.

source
Krylov.UsymlqWorkspaceType

Workspace for the in-place methods usymlq! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = UsymlqWorkspace(m, n, Sm, Sn)
workspace = UsymlqWorkspace(m, n, S)
workspace = UsymlqWorkspace(A, b)
workspace = UsymlqWorkspace(A, b, c)
workspace = UsymlqWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.UsymqrWorkspaceType

Workspace for the in-place methods usymqr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = UsymqrWorkspace(m, n, Sm, Sn)
workspace = UsymqrWorkspace(m, n, S)
workspace = UsymqrWorkspace(A, b)
workspace = UsymqrWorkspace(A, b, c)
workspace = UsymqrWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.TricgWorkspaceType

Workspace for the in-place methods tricg! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = TricgWorkspace(m, n, Sm, Sn)
workspace = TricgWorkspace(m, n, S)
workspace = TricgWorkspace(A, b)
workspace = TricgWorkspace(A, b, c)
workspace = TricgWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.TrimrWorkspaceType

Workspace for the in-place methods trimr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = TrimrWorkspace(m, n, Sm, Sn)
workspace = TrimrWorkspace(m, n, S)
workspace = TrimrWorkspace(A, b)
workspace = TrimrWorkspace(A, b, c)
workspace = TrimrWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.TrilqrWorkspaceType

Workspace for the in-place methods trilqr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = TrilqrWorkspace(m, n, Sm, Sn)
workspace = TrilqrWorkspace(m, n, S)
workspace = TrilqrWorkspace(A, b)
workspace = TrilqrWorkspace(A, b, c)
workspace = TrilqrWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.CgsWorkspaceType

Workspace for the in-place methods cgs! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:s

workspace = CgsWorkspace(m, n, S)
workspace = CgsWorkspace(A, b)
workspace = CgsWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.BicgstabWorkspaceType

Workspace for the in-place methods bicgstab! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = BicgstabWorkspace(m, n, S)
workspace = BicgstabWorkspace(A, b)
workspace = BicgstabWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.BilqWorkspaceType

Workspace for the in-place methods bilq! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = BilqWorkspace(m, n, S)
workspace = BilqWorkspace(A, b)
workspace = BilqWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.QmrWorkspaceType

Workspace for the in-place methods qmr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = QmrWorkspace(m, n, S)
workspace = QmrWorkspace(A, b)
workspace = QmrWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.BilqrWorkspaceType

Workspace for the in-place methods bilqr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = BilqrWorkspace(m, n, S)
workspace = BilqrWorkspace(A, b)
workspace = BilqrWorkspace(kc::KrylovConstructor{S,S})

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}.

source
Krylov.CglsWorkspaceType

Workspace for the in-place methods cgls! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CglsWorkspace(m, n, Sm, Sn)
workspace = CglsWorkspace(m, n, S)
workspace = CglsWorkspace(A, b)
workspace = CglsWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.CglsLanczosShiftWorkspaceType

Workspace for the in-place methods cgls_lanczos_shift! and krylov_solve!.

The following outer constructors can be used to initialize this workspace::

workspace = CglsLanczosShiftWorkspace(m, n, nshifts, Sm, Sn)
workspace = CglsLanczosShiftWorkspace(m, n, nshifts, S)
workspace = CglsLanczosShiftWorkspace(A, b, nshifts)
workspace = CglsLanczosShiftWorkspace(kc::KrylovConstructor{Sm,Sn}, nshifts)

m and n denote the dimensions of the linear operator A passed to the in-place methods. nshifts denotes the length of the vector shifts passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.CrlsWorkspaceType

Workspace for the in-place methods crls! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CrlsWorkspace(m, n, Sm, Sn)
workspace = CrlsWorkspace(m, n, S)
workspace = CrlsWorkspace(A, b)
workspace = CrlsWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.CgneWorkspaceType

Workspace for the in-place methods cgne! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CgneWorkspace(m, n, Sm, Sn)
workspace = CgneWorkspace(m, n, S)
workspace = CgneWorkspace(A, b)
workspace = CgneWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.CrmrWorkspaceType

Workspace for the in-place methods crmr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CrmrWorkspace(m, n, Sm, Sn)
workspace = CrmrWorkspace(m, n, S)
workspace = CrmrWorkspace(A, b)
workspace = CrmrWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.LslqWorkspaceType

Workspace for the in-place methods lslq! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = LslqWorkspace(m, n, Sm, Sn)
workspace = LslqWorkspace(m, n, S)
workspace = LslqWorkspace(A, b)
workspace = LslqWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.LsqrWorkspaceType

Workspace for the in-place methods lsqr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = LsqrWorkspace(m, n, Sm, Sn)
workspace = LsqrWorkspace(m, n, S)
workspace = LsqrWorkspace(A, b)
workspace = LsqrWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.LsmrWorkspaceType

Workspace for the in-place methods lsmr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = LsmrWorkspace(m, n, Sm, Sn)
workspace = LsmrWorkspace(m, n, S)
workspace = LsmrWorkspace(A, b)
workspace = LsmrWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.LnlqWorkspaceType

Workspace for the in-place methods lnlq! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = LnlqWorkspace(m, n, Sm, Sn)
workspace = LnlqWorkspace(m, n, S)
workspace = LnlqWorkspace(A, b)
workspace = LnlqWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.CraigWorkspaceType

Workspace for the in-place methods craig! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CraigWorkspace(m, n, Sm, Sn)
workspace = CraigWorkspace(m, n, S)
workspace = CraigWorkspace(A, b)
workspace = CraigWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.CraigmrWorkspaceType

Workspace for the in-place methods craigmr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = CraigmrWorkspace(m, n, S)
workspace = CraigmrWorkspace(A, b)
workspace = CraigmrWorkspace(kc::KrylovConstructor{Sm,Sn})

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}.

source
Krylov.GpmrWorkspaceType

Workspace for the in-place methods gpmr! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = GpmrWorkspace(m, n, Sm, Sn; memory = 20)
workspace = GpmrWorkspace(m, n, S; memory = 20)
workspace = GpmrWorkspace(A, b; memory = 20)
workspace = GpmrWorkspace(A, b, c; memory = 20)
workspace = GpmrWorkspace(kc::KrylovConstructor{Sm,Sn}; memory = 20)

m and n denote the dimensions of the linear operator A passed to the in-place methods. Sm and Sn are the storage types of the workspace vectors of length m and n, respectively. If the same storage type can be used for both, a single type S may be provided, such as Vector{Float64}. memory is set to n + m if the value given is larger than n + m.

source
Krylov.FgmresWorkspaceType

Workspace for the in-place methods fgmres! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = FgmresWorkspace(m, n, S; memory = 20)
workspace = FgmresWorkspace(A, b; memory = 20)
workspace = FgmresWorkspace(kc::KrylovConstructor{S,S}; memory = 20)

m and n denote the dimensions of the linear operator A passed to the in-place methods. S is the storage type of the vectors in the workspace, such as Vector{Float64}. memory is set to n if the value given is larger than n.

source

Workspace of block-Krylov methods

Krylov.BlockMinresWorkspaceType

Workspace for the in-place methods block_minres! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = BlockMinresWorkspace(m, n, p, SV, SM)
workspace = BlockMinresWorkspace(A, B)

m and n denote the dimensions of the linear operator A passed to the in-place methods. p denotes the number of columns of the right-hand side B passed to the in-place methods. SV is the storage type of the vectors in the workspace, such as Vector{Float64}. SM is the storage type of the matrices in the workspace, such as Matrix{Float64}.

source
Krylov.BlockGmresWorkspaceType

Workspace for the in-place methods block_gmres! and krylov_solve!.

The following outer constructors can be used to initialize this workspace:

workspace = BlockGmresWorkspace(m, n, p, SV, SM; memory = 5)
workspace = BlockGmresWorkspace(A, B; memory = 5)

m and n denote the dimensions of the linear operator A passed to the in-place methods. p denotes the number of columns of the right-hand side B passed to the in-place methods. SV is the storage type of the vectors in the workspace, such as Vector{Float64}. SM is the storage type of the matrices in the workspace, such as Matrix{Float64}. memory is set to div(n,p) if the value given is larger than div(n,p).

source

Utilities

Krylov.roots_quadraticFunction
roots = roots_quadratic(q₂, q₁, q₀; nitref)

Find the real roots of the quadratic

q(x) = q₂ x² + q₁ x + q₀,

where q₂, q₁ and q₀ are real. Care is taken to avoid numerical cancellation. Optionally, nitref steps of iterative refinement may be performed to improve accuracy. By default, nitref=1.

source
Krylov.sym_givensFunction
(c, s, ρ) = sym_givens(a, b)

Numerically stable symmetric Givens reflection. Given a and b reals, return (c, s, ρ) such that

[ c  s ] [ a ] = [ ρ ]
[ s -c ] [ b ] = [ 0 ].
source

Numerically stable symmetric Givens reflection. Given a and b complexes, return (c, s, ρ) with c real and (s, ρ) complexes such that

[ c   s ] [ a ] = [ ρ ]
[ s̅  -c ] [ b ] = [ 0 ].
source
Krylov.to_boundaryFunction
roots = to_boundary(n, x, d, radius; flip, xNorm2, dNorm2)

Given a trust-region radius radius, a vector x lying inside the trust-region and a direction d, return σ1 and σ2 such that

‖x + σi d‖ = radius, i = 1, 2

in the Euclidean norm. n is the length of vectors x and d. If known, ‖x‖² and ‖d‖² may be supplied with xNorm2 and dNorm2.

If flip is set to true, σ1 and σ2 are computed such that

‖x - σi d‖ = radius, i = 1, 2.
source
Krylov.vec2strFunction
s = vec2str(x; ndisp)

Display an array in the form

[ -3.0e-01 -5.1e-01  1.9e-01 ... -2.3e-01 -4.4e-01  2.4e-01 ]

with (ndisp - 1)/2 elements on each side.

source
Krylov.ktypeofFunction
S = ktypeof(v)

Return the most relevant storage type S based on the type of v.

source
Krylov.kzerosFunction
v = kzeros(S, n)

Create a vector of storage type S of length n only composed of zero.

source
Krylov.konesFunction
v = kones(S, n)

Create a vector of storage type S of length n only composed of one.

source
Krylov.vector_to_matrixFunction
M = vector_to_matrix(S)

Return the dense matrix storage type M related to the dense vector storage type S.

source
Krylov.matrix_to_vectorFunction
S = matrix_to_vector(M)

Return the dense vector storage type S related to the dense matrix storage type M.

source