Stan
2.5.0
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
stan
mcmc
hmc
hamiltonians
diag_e_point.hpp
Go to the documentation of this file.
1
#ifndef STAN__MCMC__DIAG__E__POINT__BETA
2
#define STAN__MCMC__DIAG__E__POINT__BETA
3
4
#include <
stan/mcmc/hmc/hamiltonians/ps_point.hpp
>
5
6
namespace
stan {
7
8
namespace
mcmc {
9
10
// Point in a phase space with a base
11
// Euclidean manifold with diagonal metric
12
class
diag_e_point
:
public
ps_point
{
13
14
public
:
15
16
diag_e_point
(
int
n):
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
write_metric
(std::ostream* o) {
27
if
(!o)
return
;
28
*o <<
"# Diagonal elements of inverse mass matrix:"
<< std::endl;
29
*o <<
"# "
<<
mInv
(0) << std::flush;
30
for
(
int
i = 1; i <
mInv
.size(); ++i)
31
*o <<
", "
<<
mInv
(i) << std::flush;
32
*o << std::endl;
33
};
34
35
};
36
37
}
// mcmc
38
39
}
// stan
40
41
42
#endif
stan::mcmc::diag_e_point::write_metric
void write_metric(std::ostream *o)
Definition:
diag_e_point.hpp:26
stan::mcmc::ps_point
Definition:
ps_point.hpp:16
ps_point.hpp
stan::mcmc::diag_e_point::diag_e_point
diag_e_point(const diag_e_point &z)
Definition:
diag_e_point.hpp:22
stan::mcmc::diag_e_point::diag_e_point
diag_e_point(int n)
Definition:
diag_e_point.hpp:16
stan::math::size
int size(const std::vector< T > &x)
Definition:
size.hpp:11
stan::mcmc::diag_e_point
Definition:
diag_e_point.hpp:12
stan::mcmc::diag_e_point::mInv
Eigen::VectorXd mInv
Definition:
diag_e_point.hpp:18
[
Stan Home Page
]
© 2011–2014, Stan Development Team.