36 for (
idx i = 0; i < v.
size(); ++i)
40 for (
idx i = 0; i < v.
size(); ++i)
constexpr idx size() const noexcept
Backend enum and default backend selection.
LU factorization with partial pivoting.
Dense row-major matrix templated over scalar type T.
real normalise(Vector &v)
Normalise v in-place; returns the old norm.
BasicMatrix< real > Matrix
Double-precision dense matrix with full backend dispatch (CPU + GPU).
PowerResult inverse_iteration(const Matrix &A, real sigma, real tol=1e-10, idx max_iter=1000, Backend backend=default_backend)
Inverse iteration – finds the eigenvalue closest to a shift sigma.
PowerResult power_iteration(const Matrix &A, real tol=1e-10, idx max_iter=1000, Backend backend=default_backend)
Power iteration – finds the eigenvalue largest in absolute value.
BasicVector< real > Vector
Real-valued dense vector with full backend dispatch (CPU + GPU)
constexpr Backend default_backend
PowerResult rayleigh_iteration(const Matrix &A, const Vector &x0, real tol=1e-10, idx max_iter=50, Backend backend=default_backend)
Rayleigh quotient iteration – cubically convergent.
Result of a single-eigenvalue iteration.
real eigenvalue
Converged eigenvalue (Rayleigh quotient)
idx iterations
Iterations performed.
Vector eigenvector
Corresponding unit eigenvector.
bool converged
Whether tolerance was met.
Dense vector storage and operations.