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

#include <denseFisherMetric.h>

Inheritance diagram for denseFisherMetric:
dynamMetric baseHamiltonian fisherBayesLogReg

List of all members.

Public Member Functions

 denseFisherMetric (int dim)
double T ()
 Return the kinetic energy.
double tau ()
 Return the quadratic form of the kinetic energy.
void bounceP (const VectorXd &normal)
MatrixXd & G ()
 Return the Fisher-Rao metric.
LLT< MatrixXd > & GL ()
 Return the Cholesky decompositio of the Fisher-Rao metric.
void sampleP (Random &random)
void checkEvolution (const double epsilon=1e-6)
 Comparing the evolution implementations with finite differences.
void displayState ()
 Display current state.
void prepareEvolution ()

Protected Member Functions

void fComputeMetric ()
 Compute the metric at the current position.
virtual void fComputeG ()=0
 Compute the Fisher-Rao metric.
virtual void fComputeGradG (int i)=0
 Compute the ith component of the gradient of the Fisher-Rao metric.
void fComputeCholeskyG ()
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

MatrixXd mG
 denseFisher-Rao metric
MatrixXd mGradG
 Component of the gradient of the denseFisher-Rao metric.
LLT< MatrixXd > mGL
 Cholesky decomposition of the denseFisher-Rao metric.
VectorXd mC
 Additional auxiliary vector for efficient matrix computations.

Detailed Description

Author:
Michael Betancourt

Abstract base class defining the interface for a Hamiltonian defined on a Riemannian manifold with a dense Fisher-Rao metric.


Constructor & Destructor Documentation

denseFisherMetric::denseFisherMetric ( int  dim) [explicit]

Constructor

Parameters:
dimDimension of the target space

Member Function Documentation

void denseFisherMetric::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 denseFisherMetric::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 denseFisherMetric::fComputeCholeskyG ( ) [protected]

Compute the Cholesky decomposition of the denseFisher-Rao metric at the current position as well as the determinant of the denseFisher-Rao metric

void denseFisherMetric::prepareEvolution ( ) [inline, virtual]

Perform any necessary calculations before simulation Hamiltonian dynamics

Reimplemented from dynamMetric.

Examples:
examples/main.cpp.
void denseFisherMetric::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.

Examples:
examples/main.cpp.

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