![]() |
#include <diagSoftAbsMetric.h>
Public Member Functions | |
| diagSoftAbsMetric (int dim) | |
| double | T () |
| Return the kinetic energy. | |
| double | tau () |
| Return the quadratic form of the kinetic energy. | |
| void | bounceP (const VectorXd &normal) |
| void | sampleP (Random &random) |
| void | setSoftAbsAlpha (double a) |
| 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 | fComputeDiagH ()=0 |
| Compute the diagonal components of the Hessian at the current position. | |
| virtual void | fComputeGradDiagH ()=0 |
| Compute the gradient of the diagonal Hessian. | |
| void | fComputeMetric () |
| void | fPrepareSpatialGradients () |
| 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. | |
| VectorXd | mDiagH |
| Diagonal components of the Hessian. | |
| MatrixXd | mGradDiagH |
| Gradient of the diagonal Hessian. | |
| VectorXd | mLambda |
| Inverse metric. | |
| VectorXd | mGradHelper |
| Auxiliary vector for intermeidate matrix calculations. | |
Abstract base class defining the interface for a Hamiltonian defined on a Riemannian manifold with a diagonal approximation to the SoftAbs Metric
| diagSoftAbsMetric::diagSoftAbsMetric | ( | int | dim | ) | [explicit] |
Constructor
| dim | Dimension of the target space |
| void diagSoftAbsMetric::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 diagSoftAbsMetric::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 diagSoftAbsMetric::fComputeMetric | ( | ) | [protected, virtual] |
Compute the metric at the current position, performing an eigen decomposition and computing the log determinant
Implements dynamMetric.
| void diagSoftAbsMetric::fPrepareSpatialGradients | ( | ) | [inline, protected, virtual] |
Update any position-dependent auxiliary terms in preparation for spatial gradients
Reimplemented from dynamMetric.
| void diagSoftAbsMetric::sampleP | ( | Random & | random | ) | [virtual] |
Sample the momentum from the conditional distribution
| random | External RandomLib generator |
Implements baseHamiltonian.
1.7.4