namespace gpr::uasaddle

Overview

namespace uasaddle {
 
// global functions
 
Eigen::MatrixXd obliqueNormalProjector(const Eigen::VectorXd& tangent, const Eigen::MatrixXd& force_covariance);
Eigen::VectorXd projectPerpendicular(const Eigen::VectorXd& force, const Eigen::VectorXd& tangent, const Eigen::MatrixXd& force_covariance);
Eigen::VectorXd projectPerpendicularDiagonal(const Eigen::VectorXd& force, const Eigen::VectorXd& tangent, const Eigen::VectorXd& force_variance);
Eigen::VectorXd projectPerpendicularIsotropic(const Eigen::VectorXd& force, const Eigen::VectorXd& tangent);
Eigen::VectorXd covarianceWeightedRotationForce(const Eigen::VectorXd& force_one, const Eigen::VectorXd& force_two, const Eigen::VectorXd& axis, const Eigen::MatrixXd& force_covariance);
double directionalUncertainty(const Eigen::VectorXd& direction, const Eigen::MatrixXd& force_covariance);
 
} // namespace uasaddle

Detailed Documentation

Global Functions

Eigen::MatrixXd obliqueNormalProjector(const Eigen::VectorXd& tangent, const Eigen::MatrixXd& force_covariance)

The oblique projector that removes the tangent direction in the metric induced by the inverse force covariance.

force_covariance must be symmetric positive definite; it is used through a solve, never inverted explicitly. tangent need not be normalized the projector is invariant to its scale. Throws std::invalid_argument on a shape mismatch, a non-finite input, or a tangent with no Sigma^{-1} norm.

Eigen::VectorXd projectPerpendicular(const Eigen::VectorXd& force, const Eigen::VectorXd& tangent, const Eigen::MatrixXd& force_covariance)

P F, without forming P. This is the UA-NEB replacement for F - (F . tau) tau.

Eigen::VectorXd projectPerpendicularDiagonal(const Eigen::VectorXd& force, const Eigen::VectorXd& tangent, const Eigen::VectorXd& force_variance)

The diagonal case, which is the one a GP actually hands over: a per-degree of-freedom force variance rather than a dense covariance. Sigma^{-1} tau is then elementwise, so the projection costs O(D) and needs no factorization, while still being anisotropic. Entries that are not positive fall back to the mean of the positive ones, so a single unresolved component cannot dominate the metric.

Eigen::VectorXd projectPerpendicularIsotropic(const Eigen::VectorXd& force, const Eigen::VectorXd& tangent)

The isotropic projection, kept alongside so callers and tests can state the comparison directly: F - (F . tau_hat) tau_hat.

Eigen::VectorXd covarianceWeightedRotationForce(const Eigen::VectorXd& force_one, const Eigen::VectorXd& force_two, const Eigen::VectorXd& axis, const Eigen::MatrixXd& force_covariance)

UA-Dimer rotational force. The classical form is Theta = -2 [ (F1 - F2) - ((F1 - F2) . n_hat) n_hat ]

with n_hat the dimer axis; the uncertainty-aware form removes the axial component in the Sigma^{-1} metric instead, so the rotation is driven by curvature the model actually resolves rather than by the direction of largest raw force difference.

double directionalUncertainty(const Eigen::VectorXd& direction, const Eigen::MatrixXd& force_covariance)

Effective uncertainty seen along a direction, sqrt(d^T Sigma d) / ||d||. Reported so a caller can say which directions the anisotropy is acting on.