It seems now that when the number of chains is 1,
this function would return the number of iterations.
If I add the following to the end of section effective_sample_size in
stan/src/test/mcmc/chains_test.cpp
(the change is not pushed)
stan::mcmc::chains<> c1(1, names, dimss);
add_chain(c1, 0, "src/test/mcmc/test_csv_files/blocker1.csv", 2);
idxs.clear();
idxs.push_back(0);
index = c1.get_total_param_index(c1.param_name_to_index("mu"),
idxs);
EXPECT_GT(c1.num_samples(), c1.effective_sample_size(index));
Then I would end up with
[ RUN ] McmcChains.effective_sample_size
src/test/mcmc/chains_test.cpp:1039: Failure
Expected: (c1.num_samples()) > (c1.effective_sample_size(index)), actual: 1000 vs 1000
[ FAILED ] McmcChains.effective_sample_size (57 ms)
--
Jiqiang