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 Oct 22, 2024
1 parent bf0d581 commit c411907
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/stan/analyze/mcmc/split_chains.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ inline Eigen::MatrixXd split_chains(const Eigen::MatrixXd& samples) {
int split_i = 0;
for (std::size_t i = 0; i < num_chains; ++i) {
Eigen::Map<const Eigen::VectorXd> head_block(samples.col(i).data(), half);
Eigen::Map<const Eigen::VectorXd> tail_block(samples.col(i).data() + tail_start,
half);
Eigen::Map<const Eigen::VectorXd> tail_block(
samples.col(i).data() + tail_start, half);

split_draws_matrix.col(split_i) = head_block;
split_draws_matrix.col(split_i + 1) = tail_block;
Expand Down
40 changes: 20 additions & 20 deletions src/test/unit/analyze/mcmc/split_chains_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,18 @@ TEST_F(SplitChains, split_draws_matrix_odd_rows) {
auto bar = stan::analyze::split_chains(foo);
EXPECT_EQ(4, bar.cols());
EXPECT_EQ(3, bar.rows());
EXPECT_EQ(bar(0,0), 1);
EXPECT_EQ(bar(1,0), 2);
EXPECT_EQ(bar(2,0), 3);
EXPECT_EQ(bar(0,1), 5);
EXPECT_EQ(bar(1,1), 6);
EXPECT_EQ(bar(2,1), 7);
EXPECT_EQ(bar(0,2), 8);
EXPECT_EQ(bar(1,2), 9);
EXPECT_EQ(bar(2,2), 10);
EXPECT_EQ(bar(0,3), 12);
EXPECT_EQ(bar(1,3), 13);
EXPECT_EQ(bar(2,3), 14);
EXPECT_EQ(bar(0, 0), 1);
EXPECT_EQ(bar(1, 0), 2);
EXPECT_EQ(bar(2, 0), 3);
EXPECT_EQ(bar(0, 1), 5);
EXPECT_EQ(bar(1, 1), 6);
EXPECT_EQ(bar(2, 1), 7);
EXPECT_EQ(bar(0, 2), 8);
EXPECT_EQ(bar(1, 2), 9);
EXPECT_EQ(bar(2, 2), 10);
EXPECT_EQ(bar(0, 3), 12);
EXPECT_EQ(bar(1, 3), 13);
EXPECT_EQ(bar(2, 3), 14);

Eigen::MatrixXd baz(4, 2);
for (size_t col = 0; col < 2; ++col) {
Expand All @@ -146,12 +146,12 @@ TEST_F(SplitChains, split_draws_matrix_odd_rows) {
auto boz = stan::analyze::split_chains(baz);
EXPECT_EQ(4, boz.cols());
EXPECT_EQ(2, boz.rows());
EXPECT_EQ(boz(0,0), 15);
EXPECT_EQ(boz(1,0), 16);
EXPECT_EQ(boz(0,1), 17);
EXPECT_EQ(boz(1,1), 18);
EXPECT_EQ(boz(0,2), 19);
EXPECT_EQ(boz(1,2), 20);
EXPECT_EQ(boz(0,3), 21);
EXPECT_EQ(boz(1,3), 22);
EXPECT_EQ(boz(0, 0), 15);
EXPECT_EQ(boz(1, 0), 16);
EXPECT_EQ(boz(0, 1), 17);
EXPECT_EQ(boz(1, 1), 18);
EXPECT_EQ(boz(0, 2), 19);
EXPECT_EQ(boz(1, 2), 20);
EXPECT_EQ(boz(0, 3), 21);
EXPECT_EQ(boz(1, 3), 22);
}

0 comments on commit c411907

Please sign in to comment.