.. index:: pair: class; gpr::linalg::linop::LanczosVarianceCache .. _doxid-classgpr_1_1linalg_1_1linop_1_1_lanczos_variance_cache: class gpr::linalg::linop::LanczosVarianceCache ============================================== .. toctree:: :hidden: struct_gpr_linalg_linop_LanczosVarianceCache_Quadratic.rst Overview ~~~~~~~~ Lanczos basis of K from one start vector, kept with full reorthogonalisation so that the cached quadratic forms c^T Q T^{-1} Q^T c are lower bounds on c^T K^{-1} c with a computable gap. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class LanczosVarianceCache { public: // structs struct :ref:`Quadratic`; // construction :target:`LanczosVarianceCache`(const :ref:`SymmetricOperator`& K, const Eigen::VectorXd& start); // methods :ref:`Quadratic` :ref:`quadraticDiagonal`(const Eigen::MatrixXd& C, double tolerance, double lambda_min, double flop_budget); Eigen::Index :target:`steps`() const; }; .. _details-classgpr_1_1linalg_1_1linop_1_1_lanczos_variance_cache: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Lanczos basis of K from one start vector, kept with full reorthogonalisation so that the cached quadratic forms c^T Q T^{-1} Q^T c are lower bounds on c^T K^{-1} c with a computable gap. Methods ------- .. index:: pair: function; quadraticDiagonal .. _doxid-classgpr_1_1linalg_1_1linop_1_1_lanczos_variance_cache_1a131b59b3229f4f66e3801214cc8ac0bd: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Quadratic` quadraticDiagonal(const Eigen::MatrixXd& C, double tolerance, double lambda_min, double flop_budget) Extend the basis until every column's bound is below ``tolerance`` or the next step would exceed ``flop_budget``. ``lambda_min`` is a lower bound on the smallest eigenvalue of K (the noise floor).