Stan  2.10.0
probability, sampling & optimization
unit_e_nuts_classic.hpp
Go to the documentation of this file.
1 #ifndef STAN_MCMC_HMC_NUTS_UNIT_E_NUTS_CLASSIC_HPP
2 #define STAN_MCMC_HMC_NUTS_UNIT_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 unit metric
13  template <class Model, class BaseRNG>
15  public base_nuts_classic<Model, unit_e_metric,
16  expl_leapfrog, BaseRNG> {
17  public:
18  unit_e_nuts_classic(const Model& model, BaseRNG& rng):
20  expl_leapfrog, BaseRNG>(model, rng) { }
21 
23  unit_e_point& finish,
24  Eigen::VectorXd& rho) {
25  return finish.p.dot(rho - finish.p) > 0
26  && start.p.dot(rho - start.p) > 0;
27  }
28  };
29 
30  } // mcmc
31 } // stan
32 #endif
bool compute_criterion(ps_point &start, unit_e_point &finish, Eigen::VectorXd &rho)
Probability, optimization and sampling library.
Point in a generic phase space.
Definition: ps_point.hpp:17
Point in a phase space with a base Euclidean manifold with unit metric.
Eigen::VectorXd p
Definition: ps_point.hpp:46
unit_e_nuts_classic(const Model &model, BaseRNG &rng)

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