23 requires requires(
const Op& A,
const Vector& x,
Vector& y) { A.apply(x, y); }
25 std::vector<Vector>& basis,
30 A.apply(basis[k], scratch);
35 if (
beta > breakdown_tol) {
37 basis.push_back(scratch);
Dense row-major matrix templated over scalar type T.
real arnoldi_step(const Op &A, std::vector< Vector > &basis, std::vector< real > &h, idx k, Vector &scratch, real breakdown_tol=real(1e-14))
One Arnoldi step: expand the orthonormal basis by one vector.
real mgs_orthogonalize(const std::vector< Vector > &basis, Vector &v, std::vector< real > &h, idx k)
Modified Gram-Schmidt against basis[0..k-1].
real beta(real a, real b)
B(a, b) – beta function.
void scale(Vector &v, real alpha, Backend b=default_backend)
Compute .
Dense vector storage and operations.