1 #ifndef __STAN__MCMC__SAMPLER_HPP__
2 #define __STAN__MCMC__SAMPLER_HPP__
18 const std::vector<double> params_r_;
19 const std::vector<int> params_i_;
20 const double _log_prob;
59 return params_r_.size();
79 inline void params_r(std::vector<double>& x)
const {
89 inline const std::vector<double>&
params_r()
const {
99 return params_i_.size();
Representation of a MCMC sample.
sample(const std::vector< double > ¶ms_r, const std::vector< int > ¶ms_i, double log_prob)
Construct a sample from the specified parameters and log probability.
virtual ~sample()
Destroy this sample.
int size_i() const
Return the number of discrete integer (discrete) parameters.
int size_r() const
Return the number of real (scalar) parameters.
const std::vector< int > & params_i() const
Return the vector of integer parameters for this sample.
void params_i(std::vector< int > &n) const
Set the specified parameter vector's value to the parameters in this sample.
const std::vector< double > & params_r() const
Return the underlying continuous parameter vector.
void params_r(std::vector< double > &x) const
Set the specified parameter vector's value to the parameters in this sample.
double log_prob() const
Return the log probability (possibly unnormalized) for this sample.
double params_r(int k) const
Return the value of the parameter at the specified index.
int params_i(int k) const
Return the integer (discrete) parameter at the specified index.
Probability, optimization and sampling library.