Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dense_e_point.hpp
Go to the documentation of this file.
1 #ifndef STAN__MCMC__DENSE__E__POINT__BETA
2 #define STAN__MCMC__DENSE__E__POINT__BETA
3 
5 
6 namespace stan {
7 
8  namespace mcmc {
9 
10  // Point in a phase space with a base
11  // Euclidean manifold with dense metric
12  class dense_e_point: public ps_point {
13 
14  public:
15 
16  dense_e_point(int n): ps_point(n), mInv(n, n) {
17  mInv.setIdentity();
18  };
19 
20  Eigen::MatrixXd mInv;
21 
23  fast_matrix_copy_<double>(mInv, z.mInv);
24  }
25 
26  void write_metric(std::ostream* o) {
27  if(!o) return;
28  *o << "# Elements of inverse mass matrix:" << std::endl;
29  for(int i = 0; i < mInv.rows(); ++i) {
30  *o << "# " << mInv(i, 0) << std::flush;
31  for(int j = 1; j < mInv.cols(); ++j)
32  *o << ", " << mInv(i, j) << std::flush;
33  *o << std::endl;
34  }
35  };
36 
37  };
38 
39  } // mcmc
40 
41 } // stan
42 
43 
44 #endif
void write_metric(std::ostream *o)
size_t rows(const Eigen::Matrix< T, R, C > &m)
Definition: rows.hpp:12
dense_e_point(const dense_e_point &z)
size_t cols(const Eigen::Matrix< T, R, C > &m)
Definition: cols.hpp:12

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