autoppl  v0.8
A C++ template library for probabilistic programming
result.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <string>
3 #include <Eigen/Dense>
5 
6 namespace ppl {
7 
15 template <int Major = Eigen::ColMajor>
16 struct MCMCResult
17 {
18  using cont_samples_t = Eigen::Matrix<util::cont_param_t, Eigen::Dynamic, Eigen::Dynamic, Major>;
19  using disc_samples_t = Eigen::Matrix<util::disc_param_t, Eigen::Dynamic, Eigen::Dynamic>;
20 
23  std::string name;
24  double warmup_time = 0;
25  double sampling_time = 0;
26 
27  MCMCResult() =default;
28  MCMCResult(size_t n_samples,
29  size_t n_cont_params,
30  size_t n_disc_params)
31  : cont_samples(n_samples, n_cont_params)
32  , disc_samples(n_samples, n_disc_params)
33  {}
34 };
35 
36 } // namespace ppl
ppl::MCMCResult::MCMCResult
MCMCResult()=default
ppl::MCMCResult
Definition: result.hpp:17
ppl::MCMCResult::warmup_time
double warmup_time
Definition: result.hpp:24
ppl::MCMCResult::disc_samples_t
Eigen::Matrix< util::disc_param_t, Eigen::Dynamic, Eigen::Dynamic > disc_samples_t
Definition: result.hpp:19
dist_expr_traits.hpp
ppl::MCMCResult::MCMCResult
MCMCResult(size_t n_samples, size_t n_cont_params, size_t n_disc_params)
Definition: result.hpp:28
ppl::MCMCResult::cont_samples
cont_samples_t cont_samples
Definition: result.hpp:21
ppl::MCMCResult::disc_samples
disc_samples_t disc_samples
Definition: result.hpp:22
ppl::MCMCResult::name
std::string name
Definition: result.hpp:23
ppl::MCMCResult::sampling_time
double sampling_time
Definition: result.hpp:25
ppl
Definition: bounded.hpp:11
ppl::MCMCResult::cont_samples_t
Eigen::Matrix< util::cont_param_t, Eigen::Dynamic, Eigen::Dynamic, Major > cont_samples_t
Definition: result.hpp:18