EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::roots::Ridge< Relative, Absolute > Struct Template Reference

The ridge repair: the Gershgorin ridge of decisions.md [covariance-repair], added to the diagonal of a covariance whose root failed so that the root can be retried. More...

#include <EmrysFilter/Distributions/Roots.h>

Public Types

template<typename Scalar>
using Report = RidgeReport<Scalar>
 The report: the ridge added.

Public Member Functions

template<typename Derived>
std::expected< typename Derived::PlainObject, GaussianError > repaired (Eigen::MatrixBase< Derived > const &cov) const
template<typename Derived, typename Sink>
std::expected< typename Derived::PlainObject, GaussianError > repaired (Eigen::MatrixBase< Derived > const &cov, Sink &&sink) const

Static Public Attributes

static constexpr double relative = Relative
 Relative
static constexpr double absolute = Absolute
 Absolute

Detailed Description

template<double Relative = 1.0, double Absolute = 0.0>
struct Emrys::roots::Ridge< Relative, Absolute >

The ridge repair: the Gershgorin ridge of decisions.md [covariance-repair], added to the diagonal of a covariance whose root failed so that the root can be retried.

Its margin is Relative times \( \sqrt{\epsilon} \) of the scalar times the larger of the largest diagonal magnitude and the shift that makes the matrix semidefinite, plus Absolute: ridge(), with no absolute floor, repairs a matrix that is indefinite by rounding and leaves a zero block failing, and a positive Absolute repairs that too. Fails with GaussianError::NonFinite on a covariance with NaN or infinity in its lower triangle.

Its report is a RidgeReport of the ridge \( \delta \) added.

Template Parameters
Relativethe margin in units of \( \sqrt{\epsilon} \) of the scale, at least zero
Absolutethe floor added to the margin, at least zero
See also
ridge()

Member Function Documentation

◆ repaired() [1/2]

template<double Relative = 1.0, double Absolute = 0.0>
template<typename Derived>
std::expected< typename Derived::PlainObject, GaussianError > Emrys::roots::Ridge< Relative, Absolute >::repaired ( Eigen::MatrixBase< Derived > const & cov) const
inlinenodiscard
Returns
cov with the ridge on its diagonal

◆ repaired() [2/2]

template<double Relative = 1.0, double Absolute = 0.0>
template<typename Derived, typename Sink>
std::expected< typename Derived::PlainObject, GaussianError > Emrys::roots::Ridge< Relative, Absolute >::repaired ( Eigen::MatrixBase< Derived > const & cov,
Sink && sink ) const
inlinenodiscard
Returns
cov with the ridge on its diagonal, calling sink with the RidgeReport

The documentation for this struct was generated from the following file:
  • EmrysFilter/Distributions/Roots.h