![]() |
#include <softAbsMetric.h>
Public Member Functions | |
softAbsMetric (int dim) | |
double | T () |
Return the kinetic energy. | |
double | tau () |
Return the quadratic form of the kinetic energy. | |
MatrixXd | Lambda () |
Return the inverse SoftAbs metric. | |
void | bounceP (const VectorXd &normal) |
SelfAdjointEigenSolver < MatrixXd > & | eigenDeco () |
Return the eigendecomposition of the metric. | |
VectorXd & | lambdaDotP () |
Calculate the product of the metric with the current momentum. | |
void | sampleP (Random &random) |
void | setSoftAbsAlpha (double alpha) |
Set the SoftAbs regularization coefficient. | |
void | checkEvolution (const double epsilon=1e-6) |
Comparing the evolution implementations with finite differences. | |
void | displayState () |
Display current state. | |
Protected Member Functions | |
virtual void | fComputeH ()=0 |
Compute the Hessian at the current position. | |
virtual void | fComputeGradH (int i)=0 |
Compute the ith component of the gradient of the Hessian. | |
void | fComputeMetric () |
void | fPrepareSpatialGradients () |
Compute intermediate values necessary for the spatial gradients dTaudq and dPhidq. | |
void | fUpdateP () |
Update any momenta-dependent auxiliary terms. | |
VectorXd & | dTaudp () |
Gradient of the quadrtic form with respect to the momenta. | |
VectorXd & | dTaudq () |
Gradient of the quadratic form with respect to the position. | |
VectorXd & | dPhidq () |
Gradient of the psuedo-potential with respect to the momenta. | |
Protected Attributes | |
double | mSoftAbsAlpha |
Regularization coefficient. | |
MatrixXd | mH |
Hessian. | |
MatrixXd | mGradH |
Gradient of the Hessian. | |
MatrixXd | mPseudoJ |
Discrete "pseudo-Jacobian" of the SoftAbs transform. | |
MatrixXd | mAuxMatrixOne |
Auxiliary matrix for intermediate matrix calcs. | |
MatrixXd | mAuxMatrixTwo |
Auxiliary matrix for intermediate matrix calcs. | |
MatrixXd | mCacheMatrix |
Auxiliary matrix for caching spatial gradient terms. | |
SelfAdjointEigenSolver< MatrixXd > | mEigenDeco |
Eigendecomposition of the metric. | |
VectorXd | mSoftAbsLambda |
Transformed eigenvalues. | |
VectorXd | mSoftAbsLambdaInv |
Repciprocal of the transformed eigenvalues. | |
VectorXd | mQp |
Auxiliary vector for intermediate matrix calcs. | |
VectorXd | mLambdaQp |
Auxiliary vector for intermediate matrix calcs. |
Abstract base class defining the interface for a Hamiltonian defined on a Riemannian manifold with a SoftAbs Metric
softAbsMetric::softAbsMetric | ( | int | dim | ) | [explicit] |
Constructor
dim | Dimension of the target space |
void softAbsMetric::bounceP | ( | const VectorXd & | normal | ) | [virtual] |
Evolve the momentum through a bounce off of a constraint surface
normal | Vector normal to constraint surface |
Implements baseHamiltonian.
void softAbsMetric::checkEvolution | ( | const double | epsilon = 1e-6 | ) | [virtual] |
Comparing the evolution implementations with finite differences.
Compare the position and momentum evolution implementations with finite differences
epsilon | Size of finite difference step |
Reimplemented from baseHamiltonian.
void softAbsMetric::fComputeMetric | ( | ) | [protected, virtual] |
Compute the metric at the current position, performing an eigen decomposition and computing the log determinant
Implements dynamMetric.
void softAbsMetric::sampleP | ( | Random & | random | ) | [virtual] |
Sample the momentum from the conditional distribution
random | External RandomLib generator |
Implements baseHamiltonian.