87 float tolerance = 1e-6f, uint64_t seed = 0);
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) – th...
Definition tensor.hpp:29
Definition acquisition_functions.hpp:16
QRResult QR(const Tensor &a)
Thin QR factorization by Householder reflections.
EigenResult SymmetricEigen(const Tensor &a)
All eigenvalues and eigenvectors of a symmetric matrix, by Householder reduction to tridiagonal form ...
SVDResult SVD(const Tensor &a)
Thin singular value decomposition by one-sided (Hestenes) Jacobi rotations.
DominantEigenResult PowerIteration(const Tensor &a, int64_t max_iterations=1000, float tolerance=1e-6f, uint64_t seed=0)
The dominant eigenpair of a symmetric matrix by power iteration – cheaper than SymmetricEigen() when ...
PowerIteration()'s result.
Definition matrix_decompositions.hpp:31
float value
The dominant eigenvalue (largest in magnitude), as a Rayleigh quotient.
Definition matrix_decompositions.hpp:33
int64_t iterations
Iterations run. Equals max_iterations when not converged.
Definition matrix_decompositions.hpp:37
bool converged
Whether successive vectors agreed to within the tolerance.
Definition matrix_decompositions.hpp:39
Tensor vector
Shape (n): its unit eigenvector, sign made canonical.
Definition matrix_decompositions.hpp:35
SymmetricEigen()'s result.
Definition matrix_decompositions.hpp:23
Tensor values
Shape (n): eigenvalues, largest first.
Definition matrix_decompositions.hpp:25
Tensor vectors
Shape (n, n): column j is the unit eigenvector for values[j].
Definition matrix_decompositions.hpp:27
QR()'s result, the thin factorization A = Q R.
Definition matrix_decompositions.hpp:43
Tensor q
Shape (m, n): orthonormal columns.
Definition matrix_decompositions.hpp:45
Tensor r
Shape (n, n): upper triangular, non-negative diagonal.
Definition matrix_decompositions.hpp:47
SVD()'s result, the thin factorization A = U diag(S) V^T with k = min(m, n).
Definition matrix_decompositions.hpp:51
Tensor s
Shape (k): singular values, largest first, non-negative.
Definition matrix_decompositions.hpp:55
Tensor v
Shape (n, k): orthonormal right singular vectors, signs made canonical.
Definition matrix_decompositions.hpp:57
Tensor u
Shape (m, k): orthonormal left singular vectors.
Definition matrix_decompositions.hpp:53
N-dimensional tensor – owns a buffer via DeviceBackend*, RAII (Rule of Five).