Stan  2.10.0
probability, sampling & optimization
dense_e_nuts_classic.hpp
Go to the documentation of this file.
1 #ifndef STAN_MCMC_HMC_NUTS_DENSE_E_NUTS_CLASSIC_HPP
2 #define STAN_MCMC_HMC_NUTS_DENSE_E_NUTS_CLASSIC_HPP
3 
8 
9 namespace stan {
10  namespace mcmc {
11  // The No-U-Turn Sampler (NUTS) on a
12  // Euclidean manifold with dense metric
13  template <class Model, class BaseRNG>
15  public base_nuts_classic<Model, dense_e_metric,
16  expl_leapfrog, BaseRNG> {
17  public:
18  dense_e_nuts_classic(const Model& model, BaseRNG& rng):
20  expl_leapfrog, BaseRNG>(model, rng) { }
21 
22  // Note that the points don't need to be swapped
23  // here since start.mInv = finish.mInv
25  dense_e_point& finish,
26  Eigen::VectorXd& rho) {
27  return finish.p.transpose() * finish.mInv * (rho - finish.p) > 0
28  && start.p.transpose() * finish.mInv * (rho - start.p) > 0;
29  }
30  };
31 
32  } // mcmc
33 } // stan
34 #endif
Probability, optimization and sampling library.
bool compute_criterion(ps_point &start, dense_e_point &finish, Eigen::VectorXd &rho)
Point in a generic phase space.
Definition: ps_point.hpp:17
dense_e_nuts_classic(const Model &model, BaseRNG &rng)
Eigen::VectorXd p
Definition: ps_point.hpp:46
Point in a phase space with a base Euclidean manifold with dense metric.

     [ Stan Home Page ] © 2011–2016, Stan Development Team.