Types

Krylov.SimpleStatsType

Type for statistics returned by the majority of Krylov solvers, the attributes are:

  • solved
  • inconsistent
  • residuals
  • Aresiduals
  • status
source
Krylov.LanczosStatsType

Type for statistics returned by Lanczos solvers CG-LANCZOS and CG-LANCZOS-SHIFT-SEQ, the attributes are:

  • solved
  • residuals
  • flagged
  • Anorm
  • Acond
  • status
source
Krylov.SymmlqStatsType

Type for statistics returned by SYMMLQ, the attributes are:

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

Type for statistics returned by adjoint systems solvers BiLQR and TriLQR, the attributes are:

  • solved_primal
  • solved_dual
  • residuals_primal
  • residuals_dual
  • status
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, return (c, s, ρ) such that

[ c  s ] [ a ] = [ ρ ]
[ s -c ] [ b ] = [ 0 ].
source
Krylov.to_boundaryFunction
roots = to_boundary(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. If known, ‖x‖² may be supplied in xNorm2.

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.kzerosFunction
v = kzeros(S, n)

Create an AbstractVector of storage type S of length n only composed of zero.

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

Create an AbstractVector of storage type S of length n only composed of one.

source