.. index:: pair: class; gpr::optim::SecantHessian .. _doxid-classgpr_1_1optim_1_1_secant_hessian: class gpr::optim::SecantHessian =============================== .. toctree:: :hidden: Overview ~~~~~~~~ Dense symmetric Hessian estimate carried by consecutive true gradients. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class SecantHessian { public: // construction :target:`SecantHessian`(:ref:`SecantHessianMethod` method = :ref:`SecantHessianMethod::Bofill`); // methods void :target:`reset`(); bool :target:`observe`(const Eigen::VectorXd& position, const Eigen::VectorXd& gradient); bool :ref:`observe`(const Eigen::VectorXd& position, const Eigen::VectorXd& gradient, double energy); void :ref:`noteEnergy`(double energy); bool :target:`hasReferenceEnergy`() const; double :target:`referenceEnergy`() const; bool :target:`available`() const; std::size_t :target:`pairs`() const; const Eigen::MatrixXd& :target:`hessian`() const; const Eigen::VectorXd& :target:`referencePosition`() const; const Eigen::VectorXd& :target:`referenceGradient`() const; const Eigen::VectorXd& :target:`lastDirection`() const; const Eigen::MatrixXd& :ref:`measuredSteps`() const; :ref:`SecantConsistency` :target:`consistency`(const Eigen::VectorXd& posterior_action, double relative_tolerance) const; double :target:`meanEnergy`(const Eigen::VectorXd& position, double reference_energy) const; Eigen::VectorXd :target:`meanGradient`(const Eigen::VectorXd& position) const; static bool :ref:`update`(Eigen::MatrixXd& matrix, :ref:`SecantHessianMethod` method, const Eigen::VectorXd& step, const Eigen::VectorXd& gradient_change); }; .. _details-classgpr_1_1optim_1_1_secant_hessian: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Dense symmetric Hessian estimate carried by consecutive true gradients. The first usable pair supplies the isotropic BFGS scale. SR1 and Bofill start from zero, which is already a valid symmetric prior. Failed updates are reported to the caller; methods are never substituted silently. Methods ------- .. index:: pair: function; observe .. _doxid-classgpr_1_1optim_1_1_secant_hessian_1a6e03f9fcbd1cdf6c76a6a7bfc6fd6a6f: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool observe(const Eigen::VectorXd& position, const Eigen::VectorXd& gradient, double energy) Observe a geometry together with its energy. The quadratic mean expands about the reference geometry, so the energy is kept only when this geometry becomes that reference: the first geometry, or an accepted pair. A refused pair leaves both the reference and its energy alone, and an accepted geometry whose energy is not finite leaves no reference energy rather than the previous geometry's. .. index:: pair: function; noteEnergy .. _doxid-classgpr_1_1optim_1_1_secant_hessian_1ae31e4f4a472becbb8850aa0f1d688f87: .. ref-code-block:: cpp :class: doxyrest-title-code-block void noteEnergy(double energy) Energy at the latest observed geometry. The quadratic mean expands about that point. .. index:: pair: function; measuredSteps .. _doxid-classgpr_1_1optim_1_1_secant_hessian_1ab99cd548b48d4046cb16c97b415fe8d7: .. ref-code-block:: cpp :class: doxyrest-title-code-block const Eigen::MatrixXd& measuredSteps() const Orthonormal basis of all independent accepted step directions. Step lengths are removed before membership is tested, so the span is invariant to coordinate units and contains at most one column per degree of freedom. .. index:: pair: function; update .. _doxid-classgpr_1_1optim_1_1_secant_hessian_1aec70bc028f5f0caf0201fc6be6f5dff0: .. ref-code-block:: cpp :class: doxyrest-title-code-block static bool update(Eigen::MatrixXd& matrix, :ref:`SecantHessianMethod` method, const Eigen::VectorXd& step, const Eigen::VectorXd& gradient_change) Apply one named direct-Hessian update to caller-owned state. False means that method's own denominator/curvature condition failed.