Skip to content

Commit

Permalink
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-buildbot committed Jan 5, 2024
1 parent 5c8aa63 commit 6e7c832
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/stan/callbacks/unique_stream_writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class unique_stream_writer final : public writer {
return;
write_vector(values);
}

/**
* Writes a set of values in csv format followed by a newline.
*
Expand Down
1 change: 0 additions & 1 deletion src/stan/callbacks/writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class writer {
* @param[in] v Values in an Eigen row vector
*/
virtual void operator()(const Eigen::Matrix<double, 1, -1>& values) {}

};

} // namespace callbacks
Expand Down
14 changes: 9 additions & 5 deletions src/stan/services/pathfinder/single.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,23 +881,25 @@ inline auto pathfinder_lbfgs_single(
const auto total_size = elbo_draws.cols() + new_draws.cols();
constrained_draws_mat
= Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(names.size(),
total_size);
total_size);
Eigen::VectorXd unconstrained_col;
Eigen::VectorXd approx_samples_constrained_col;
for (Eigen::Index i = 0; i < elbo_draws.cols(); ++i) {
constrained_draws_mat.col(i).head(2) = elbo_lp_mat.row(i).matrix();
unconstrained_col = elbo_draws.col(i);
constrained_draws_mat.col(i).tail(num_unconstrained_params)
= constrain_fun(rng, unconstrained_col,
approx_samples_constrained_col).matrix();
approx_samples_constrained_col)
.matrix();
}
for (Eigen::Index i = elbo_draws.cols(), j = 0; i < total_size;
++i, ++j) {
constrained_draws_mat.col(i).head(2) = lp_draws.row(j).matrix();
unconstrained_col = new_draws.col(j);
constrained_draws_mat.col(i).tail(num_unconstrained_params)
= constrain_fun(rng, unconstrained_col,
approx_samples_constrained_col).matrix();
approx_samples_constrained_col)
.matrix();
}
} catch (const std::exception& e) {
std::string err_msg = e.what();
Expand All @@ -917,7 +919,8 @@ inline auto pathfinder_lbfgs_single(
unconstrained_col = elbo_draws.col(i);
constrained_draws_mat.col(i).tail(num_unconstrained_params)
= constrain_fun(rng, unconstrained_col,
approx_samples_constrained_col).matrix();
approx_samples_constrained_col)
.matrix();
}
lp_ratio = std::move(elbo_best.lp_ratio);
}
Expand All @@ -932,7 +935,8 @@ inline auto pathfinder_lbfgs_single(
unconstrained_col = elbo_draws.col(i);
constrained_draws_mat.col(i).tail(num_unconstrained_params)
= constrain_fun(rng, unconstrained_col,
approx_samples_constrained_col).matrix();
approx_samples_constrained_col)
.matrix();
}
lp_ratio = std::move(elbo_best.lp_ratio);
}
Expand Down

0 comments on commit 6e7c832

Please sign in to comment.