Public Member Functions | Protected Member Functions | Protected Attributes
diagOuterSoftAbsMetric Class Reference

#include <diagOuterSoftAbsMetric.h>

Inheritance diagram for diagOuterSoftAbsMetric:
dynamMetric baseHamiltonian

List of all members.

Public Member Functions

 diagOuterSoftAbsMetric (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 fComputeH ()=0
 Compute the Hessian at the current position.
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.
MatrixXd mH
 Gradient of the diagonal Hessian.
VectorXd mLambda
 Inverse metric.
VectorXd mGradHelper
 Auxiliary vector for intermeidate matrix calculations.

Detailed Description

Author:
Michael Betancourt

Abstract base class defining the interface for a Hamiltonian defined on a Riemannian manifold with a diagonal outer-product approximation to the SoftAbs Metric


Constructor & Destructor Documentation

diagOuterSoftAbsMetric::diagOuterSoftAbsMetric ( int  dim) [explicit]

Constructor

Parameters:
dimDimension of the target space

Member Function Documentation

void diagOuterSoftAbsMetric::bounceP ( const VectorXd &  normal) [virtual]

Evolve the momentum through a bounce off of a constraint surface

Parameters:
normalVector normal to constraint surface

Implements baseHamiltonian.

void diagOuterSoftAbsMetric::checkEvolution ( const double  epsilon = 1e-6) [virtual]

Comparing the evolution implementations with finite differences.

Compare the position and momentum evolution implementations with finite differences

Parameters:
epsilonSize of finite difference step

Reimplemented from baseHamiltonian.

void diagOuterSoftAbsMetric::fComputeMetric ( ) [protected, virtual]

Compute the metric at the current position, performing an eigen decomposition and computing the log determinant

Implements dynamMetric.

void diagOuterSoftAbsMetric::fPrepareSpatialGradients ( ) [inline, protected, virtual]

Update any position-dependent auxiliary terms in preparation for spatial gradients

Reimplemented from dynamMetric.

void diagOuterSoftAbsMetric::sampleP ( Random &  random) [virtual]

Sample the momentum from the conditional distribution $ \pi \left( \mathbf{p} | \mathbf{q} \right) \propto \exp \left( - T \left( \mathbf{p}, \mathbf{q} \right) \right) $

Parameters:
randomExternal RandomLib generator

Implements baseHamiltonian.


The documentation for this class was generated from the following files:
 All Classes Functions Variables