diff --git a/src/stan/callbacks/json_writer.hpp b/src/stan/callbacks/json_writer.hpp index 5b6299c792..d791b8a737 100644 --- a/src/stan/callbacks/json_writer.hpp +++ b/src/stan/callbacks/json_writer.hpp @@ -146,7 +146,7 @@ class json_writer final : public structured_writer { /** * Writes the set of comma separated values in an Eigen (row) vector. * - * @param[in] v Values in a std::vector + * @param[in] v Values in an `Eigen::Vector` */ template void write_eigen_vector(const Eigen::DenseBase& v) { @@ -357,7 +357,7 @@ class json_writer final : public structured_writer { * @param key Name of the value pair * @param values vector to write. */ - void write(const std::string& key, const std::vector& v) { + void write(const std::string& key, const std::vector& values) { if (output_ == nullptr) { return; } @@ -365,14 +365,14 @@ class json_writer final : public structured_writer { write_key(key); *output_ << "[ "; - if (v.size() > 0) { - auto last = v.end(); + if (values.size() > 0) { + auto last = values.end(); --last; - for (auto it = v.begin(); it != last; ++it) { + for (auto it = values.begin(); it != last; ++it) { *output_ << process_string(*it) << ", "; } } - *output_ << v.back() << " ]"; + *output_ << values.back() << " ]"; } /** @@ -380,7 +380,7 @@ class json_writer final : public structured_writer { * @param key Name of the value pair * @param values vector to write. */ - void write(const std::string& key, const std::vector& v) { + void write(const std::string& key, const std::vector& values) { if (output_ == nullptr) { return; } @@ -388,14 +388,14 @@ class json_writer final : public structured_writer { write_key(key); *output_ << "[ "; - if (v.size() > 0) { - auto last = v.end(); + if (values.size() > 0) { + auto last = values.end(); --last; - for (auto it = v.begin(); it != last; ++it) { + for (auto it = values.begin(); it != last; ++it) { write_value(*it); *output_ << ", "; } - write_value(v.back()); + write_value(values.back()); } *output_ << " ]"; } @@ -405,7 +405,7 @@ class json_writer final : public structured_writer { * @param key Name of the value pair * @param values vector to write. */ - void write(const std::string& key, const std::vector& v) { + void write(const std::string& key, const std::vector& values) { if (output_ == nullptr) { return; } @@ -413,14 +413,14 @@ class json_writer final : public structured_writer { write_key(key); *output_ << "[ "; - if (v.size() > 0) { - auto last = v.end(); + if (values.size() > 0) { + auto last = values.end(); --last; - for (auto it = v.begin(); it != last; ++it) { + for (auto it = values.begin(); it != last; ++it) { *output_ << *it << ", "; } } - *output_ << v.back() << " ]"; + *output_ << values.back() << " ]"; } /** @@ -429,7 +429,7 @@ class json_writer final : public structured_writer { * @param values vector to write. */ void write(const std::string& key, - const std::vector>& v) { + const std::vector>& values) { if (output_ == nullptr) { return; } @@ -437,13 +437,13 @@ class json_writer final : public structured_writer { write_key(key); *output_ << "[ "; - if (v.size() > 0) { - size_t last = v.size() - 1; + if (values.size() > 0) { + size_t last = values.size() - 1; for (size_t i = 0; i < last; ++i) { - write_complex_value(v[i]); + write_complex_value(values[i]); *output_ << ", "; } - write_complex_value(v[last]); + write_complex_value(values[last]); } *output_ << " ]"; } diff --git a/src/stan/callbacks/structured_writer.hpp b/src/stan/callbacks/structured_writer.hpp index fae1aed081..868c4c0cf3 100644 --- a/src/stan/callbacks/structured_writer.hpp +++ b/src/stan/callbacks/structured_writer.hpp @@ -106,8 +106,8 @@ class structured_writer { * @param key Name of the value pair * @param values vector to write. */ - virtual void write(const std::string& key, const std::vector values) { - } + virtual void write(const std::string& key, + const std::vector& values) {} /** * Write a key-value pair where the value is a vector of strings to be made a @@ -124,14 +124,14 @@ class structured_writer { * @param values vector to write. */ virtual void write(const std::string& key, - const std::vector>& v) {} + const std::vector>& values) {} /** * Write a key-value pair where the value is a vector to be made a list. * @param key Name of the value pair * @param values vector to write. */ - virtual void write(const std::string& key, const std::vector& v) {} + virtual void write(const std::string& key, const std::vector& values) {} /** * Write a key-value pair where the value is an Eigen Matrix. diff --git a/src/stan/model/model_base_crtp.hpp b/src/stan/model/model_base_crtp.hpp index e0366a2f7a..5a64ced8c0 100644 --- a/src/stan/model/model_base_crtp.hpp +++ b/src/stan/model/model_base_crtp.hpp @@ -137,7 +137,7 @@ class model_base_crtp : public stan::model::model_base { Eigen::VectorXd& vars, bool include_tparams = true, bool include_gqs = true, std::ostream* msgs = 0) const override { - return static_cast(this)->template write_array( + return static_cast(this)->write_array( rng, theta, vars, include_tparams, include_gqs, msgs); } @@ -206,7 +206,7 @@ class model_base_crtp : public stan::model::model_base { std::vector& theta_i, std::vector& vars, bool include_tparams = true, bool include_gqs = true, std::ostream* msgs = 0) const override { - return static_cast(this)->template write_array( + return static_cast(this)->write_array( rng, theta, theta_i, vars, include_tparams, include_gqs, msgs); } diff --git a/src/stan/optimization/bfgs_linesearch.hpp b/src/stan/optimization/bfgs_linesearch.hpp index 312459e378..e2c375a609 100644 --- a/src/stan/optimization/bfgs_linesearch.hpp +++ b/src/stan/optimization/bfgs_linesearch.hpp @@ -195,7 +195,8 @@ int WolfLSZoom(Scalar &alpha, XType &newX, Scalar &newF, XType &newDF, * * @param x1 Final point, equal to \f$ x_0 + \alpha p \f$. * - * @param f1 Final point function value, equal to \f$ f(x_0 + \alpha p) \f$. + * @param func_val Final point function value, equal to \f$ f(x_0 + \alpha p) + *\f$. * * @param gradx1 Final point gradient, equal to \f$ g(x_0 + \alpha p) \f$. * diff --git a/src/stan/services/sample/hmc_nuts_unit_e_adapt.hpp b/src/stan/services/sample/hmc_nuts_unit_e_adapt.hpp index 332a720ca5..b6b345b8dd 100644 --- a/src/stan/services/sample/hmc_nuts_unit_e_adapt.hpp +++ b/src/stan/services/sample/hmc_nuts_unit_e_adapt.hpp @@ -103,7 +103,8 @@ int hmc_nuts_unit_e_adapt( * @param[in] init An std vector of init var contexts for initialization of each * chain. * @param[in] random_seed random seed for the random number generator - * @param[in] chain chain id to advance the pseudo random number generator + * @param[in] init_chain_id chain id to advance the pseudo random number + * generator * @param[in] init_radius radius to initialize * @param[in] num_warmup Number of warmup samples * @param[in] num_samples Number of samples