Skip to content

Commit f8d131a

Browse files
authored
Merge pull request #1192 from stan-dev/opt-converged
Handle new 'converged' column in optimizing output
2 parents 367e6e9 + 873bbe2 commit f8d131a

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

StanHeaders/DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: StanHeaders
22
Title: C++ Header Files for Stan
3-
Version: 2.36.0.9000
3+
Version: 2.39.0.9000
44
Authors@R: c(person("Ben",family="Goodrich", email="benjamin.goodrich@columbia.edu", role=c('cre','aut')),
55
person("Joshua", "Pritikin", role = "ctb"),
66
person("Andrew", "Gelman", role = "aut"),
@@ -43,3 +43,4 @@ Depends: R (>= 3.4.0)
4343
License: BSD_3_clause + file LICENSE
4444
Encoding: UTF-8
4545
RoxygenNote: 7.1.2
46+
Config/build/compilation-database: true

rstan/rstan/DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: rstan
22
Type: Package
33
Title: R Interface to Stan
4-
Version: 2.36.0.9000
4+
Version: 2.39.0.9000
55
Authors@R: c(person("Jiqiang", "Guo", email = "guojq28@gmail.com", role = "aut"),
66
person("Jonah", "Gabry", email = "jgabry@gmail.com", role = "aut"),
77
person("Ben", "Goodrich", email = "benjamin.goodrich@columbia.edu", role = c("cre", "aut")),
@@ -73,3 +73,4 @@ SystemRequirements: GNU make, pandoc
7373
Encoding: UTF-8
7474
RoxygenNote: 7.1.2
7575
Config/testthat/edition: 3
76+
Config/build/compilation-database: true

rstan/rstan/inst/include/rstan/stan_fit.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,11 @@ int command(stan_args& args, Model& model, Rcpp::List& holder,
555555
std::vector<double> params = sample_writer.x();
556556
double lp = params.front();
557557
params.erase(params.begin());
558+
double converged = params.front();
559+
params.erase(params.begin());
558560
holder = Rcpp::List::create(Rcpp::_["par"] = params,
559-
Rcpp::_["value"] = lp);
560-
561+
Rcpp::_["value"] = lp,
562+
Rcpp::_["converged"] = converged);
561563
}
562564
if (args.get_method() == SAMPLING) {
563565
std::vector<std::string> sample_names;

0 commit comments

Comments
 (0)