Stan  2.10.0
probability, sampling & optimization
diag_e_point.hpp
Go to the documentation of this file.
1 #ifndef STAN_MCMC_HMC_HAMILTONIANS_DIAG_E_POINT_HPP
2 #define STAN_MCMC_HMC_HAMILTONIANS_DIAG_E_POINT_HPP
3 
6 
7 namespace stan {
8  namespace mcmc {
13  class diag_e_point: public ps_point {
14  public:
15  explicit diag_e_point(int n)
16  : ps_point(n), mInv(n) {
17  mInv.setOnes();
18  }
19 
20  Eigen::VectorXd mInv;
21 
22  diag_e_point(const diag_e_point& z): ps_point(z), mInv(z.mInv.size()) {
23  fast_vector_copy_<double>(mInv, z.mInv);
24  }
25 
26  void
28  writer("Diagonal elements of inverse mass matrix:");
29  std::stringstream mInv_ss;
30  mInv_ss << mInv(0);
31  for (int i = 1; i < mInv.size(); ++i)
32  mInv_ss << ", " << mInv(i);
33  writer(mInv_ss.str());
34  }
35  };
36 
37  } // mcmc
38 } // stan
39 
40 #endif
Probability, optimization and sampling library.
Point in a generic phase space.
Definition: ps_point.hpp:17
base_writer is an abstract base class defining the interface for Stan writer callbacks.
Definition: base_writer.hpp:20
diag_e_point(const diag_e_point &z)
Point in a phase space with a base Euclidean manifold with diagonal metric.
void write_metric(stan::interface_callbacks::writer::base_writer &writer)
Writes the metric.

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