1 #ifndef STAN__COMMON__RECORDER__SUM_VALUES_HPP
2 #define STAN__COMMON__RECORDER__SUM_VALUES_HPP
15 : N_(N), m_(0), skip_(0), sum_(N_, 0.0) { }
18 : N_(N), m_(0), skip_(skip), sum_(N_, 0.0) { }
39 throw std::length_error(
"vector provided does not match the parameter length");
41 for (
size_t n = 0; n < N_; n++) {
68 const std::vector<double>&
sum()
const {
88 std::vector<double> sum_;
bool is_recording() const
Indicator function for whether the instance is recording.
void operator()()
Do nothing.
sum_values(const size_t N, const size_t skip)
void operator()(const std::vector< T > &x)
Add values to cumulative sum.
const size_t called() const
void operator()(const std::string x)
Do nothing with a string.
sum_values(const size_t N)
const std::vector< double > & sum() const
const size_t recorded() const
void operator()(const std::vector< std::string > &x)
Do nothing with std::string vector.