36 void reset(T
sigma, Eigen::Ref<
const Eigen::MatrixX<T>> A);
42 [[nodiscard]]
const Eigen::MatrixX<T>&
basis()
const;
48 [[nodiscard]] Eigen::VectorX<T>
inverse_times_vec(Eigen::Ref<
const Eigen::VectorX<T>> rhs)
const;
50 [[nodiscard]] Eigen::VectorX<T>
times_vec(Eigen::Ref<
const Eigen::VectorX<T>> rhs)
const;
53 [[nodiscard]] Eigen::MatrixX<T>
inverse_times_mat(Eigen::Ref<
const Eigen::MatrixX<T>> rhs)
const;
55 [[nodiscard]] Eigen::MatrixX<T>
times_mat(Eigen::Ref<
const Eigen::MatrixX<T>> rhs)
const;
59 [[nodiscard]]
const Eigen::MatrixX<T>&
R()
const;
Eigen::MatrixX< T > times_mat(Eigen::Ref< const Eigen::MatrixX< T > > rhs) const
Column-wise application of C to a matrix rhs.
Eigen::VectorX< T > times_vec(Eigen::Ref< const Eigen::VectorX< T > > rhs) const
Returns C * rhs = sigma^2 * rhs + A^T * (A * rhs).
Eigen::VectorX< T > inverse_times_vec(Eigen::Ref< const Eigen::VectorX< T > > rhs) const
Returns C^{-1} * rhs, computed via two triangular solves on R.
Eigen::Index dimension() const
Returns n, the dimension of the covariance (number of columns of A).
const Eigen::MatrixX< T > & R() const
Returns the upper-triangular R factor of the QR factorization of [sigma*I; A], so that C = R^T * R.
T inverse_logDeterminant() const
Returns log(det(C^{-1})) = -log(det(C)).
LowRankCovarianceMatrixT()=default
const Eigen::MatrixX< T > & basis() const
Returns the stored basis A passed to reset().
void reset(T sigma, Eigen::Ref< const Eigen::MatrixX< T > > A)
(Re)build the covariance from a regularizer sigma and basis A.
Eigen::MatrixX< T > inverse_times_mat(Eigen::Ref< const Eigen::MatrixX< T > > rhs) const
Column-wise application of C^{-1} to a matrix rhs.
T logDeterminant() const
Returns log(det(C)), computed stably as 2 * sum(log|diag(R)|).
Online (incremental) Householder QR solver for tall, column-sparse least-squares problems.