16#ifndef GPR_LINALG_EIGENBACKEND_H_
17#define GPR_LINALG_EIGENBACKEND_H_
19#include <Eigen/Cholesky>
31 if (C.rows() != C.cols())
return false;
34 if (!scaling.compute(C.diagonal()))
return false;
37 C.rows(), C.cols(), [&](Eigen::Index i, Eigen::Index j) {
38 return i >= j ? scaling.covariance(C(i, j), i, j) : 0.0;
41 scaling.restoreFactor(lower);
45#if defined(USE_OPENMP)
51 C.rows(), C.cols(), [&](Eigen::Index i, Eigen::Index j) {
52 return i >= j ? scaling.covariance(C(i, j), i, j) : 0.0;
55 scaling.restoreFactor(lower);
60 Eigen::LLT<EigenMatrix> llt;
61 llt.
compute(EigenMatrix::NullaryExpr(
62 C.rows(), C.cols(), [&](Eigen::Index i, Eigen::Index j) {
63 return i >= j ? scaling.covariance(C(i, j), i, j) : 0.0;
67 if (llt.info() != Eigen::Success)
return false;
69 scaling.restoreFactor(L);
bool compute(const Eigen::MatrixBase< Derived > &diagonal)
Dense and structured linear algebra behind the GP: Cholesky and eigen solvers, linear operators,...
bool teamPanelKernels() noexcept
bool trainingCholeskyLower(ProductMatrix lower)
bool teamCholeskyLower(double *lower, std::int64_t lda, std::int64_t n)
bool trainingCholeskySelected(Eigen::Index order)
bool cholesky(const EigenMatrix &C, EigenMatrix &L)
Cholesky decomposition (LAPACK equivalent: dpotrf).
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Eigen::Matrix< double, EigenDynamic, EigenDynamic, EigenMatrixStorage > EigenMatrix