initialize_test.cpp
Go to the documentation of this file.
2 #include <gtest/gtest.h>
3 #include <test/unit/util.hpp>
6 #include <sstream>
7 #include <test/test-models/good/services/test_lp.hpp>
12 
13 class ServicesUtilInitialize : public testing::Test {
14  public:
16  : model(empty_context, 12345, &model_ss),
18  rng(stan::services::util::create_rng(0, 1)) {}
19 
20  stan_model model;
22  std::stringstream model_ss;
23  std::stringstream message_ss;
27  boost::ecuyer1988 rng;
28 };
29 
30 TEST_F(ServicesUtilInitialize, radius_zero__print_false) {
31  std::vector<double> params;
32 
33  double init_radius = 0;
34  bool print_timing = false;
36  init_radius, print_timing,
37  logger, init);
38  ASSERT_EQ(model.num_params_r(), params.size())
39  << "2 parameters";
40  EXPECT_FLOAT_EQ(0, params[0]);
41  EXPECT_FLOAT_EQ(0, params[1]);
42 
43  EXPECT_EQ(0, logger.call_count());
44  ASSERT_EQ(1, init.vector_double_values().size());
45  ASSERT_EQ(2, init.vector_double_values()[0].size());
46  EXPECT_EQ(params[0], init.vector_double_values()[0][0]);
47  EXPECT_EQ(params[1], init.vector_double_values()[0][1]);
48 }
49 
50 TEST_F(ServicesUtilInitialize, radius_zero__initialize_with_Jacobian) {
51  std::vector<double> params;
52 
53  double init_radius = 0;
54  bool print_timing = false;
55  params = stan::services::util::initialize<false>(model, empty_context, rng,
56  init_radius, print_timing,
57  logger, init);
58  ASSERT_EQ(model.num_params_r(), params.size())
59  << "2 parameters";
60  EXPECT_FLOAT_EQ(0, params[0]);
61  EXPECT_FLOAT_EQ(0, params[1]);
62 
63  EXPECT_EQ(0, logger.call_count());
64  ASSERT_EQ(1, init.vector_double_values().size());
65  ASSERT_EQ(2, init.vector_double_values()[0].size());
66  EXPECT_EQ(params[0], init.vector_double_values()[0][0]);
67  EXPECT_EQ(params[1], init.vector_double_values()[0][1]);
68 }
69 
70 TEST_F(ServicesUtilInitialize, radius_two__print_false) {
71  std::vector<double> params;
72 
73  double init_radius = 2;
74  bool print_timing = false;
76  init_radius, print_timing,
77  logger, init);
78  ASSERT_EQ(model.num_params_r(), params.size())
79  << "2 parameters";
80  EXPECT_GT(params[0], -init_radius);
81  EXPECT_LT(params[0], init_radius);
82  EXPECT_GT(params[1], -init_radius);
83  EXPECT_LT(params[1], init_radius);
84 
85  EXPECT_EQ(0, logger.call_count());
86  ASSERT_EQ(1, init.vector_double_values().size());
87  ASSERT_EQ(2, init.vector_double_values()[0].size());
88  EXPECT_EQ(params[0], init.vector_double_values()[0][0]);
89  EXPECT_EQ(params[1], init.vector_double_values()[0][1]);
90 }
91 
92 TEST_F(ServicesUtilInitialize, radius_two__print_true) {
93  std::vector<double> params;
94 
95  double init_radius = 2;
96  bool print_timing = true;
98  init_radius, print_timing,
99  logger, init);
100  ASSERT_EQ(model.num_params_r(), params.size())
101  << "2 parameters";
102  EXPECT_GT(params[0], -init_radius);
103  EXPECT_LT(params[0], init_radius);
104  EXPECT_GT(params[1], -init_radius);
105  EXPECT_LT(params[1], init_radius);
106 
107  EXPECT_EQ(6, logger.call_count());
108  EXPECT_EQ(6, logger.call_count_info());
109  EXPECT_EQ(1, logger.find_info("Gradient evaluation"));
110  ASSERT_EQ(1, init.vector_double_values().size());
111  ASSERT_EQ(2, init.vector_double_values()[0].size());
112  EXPECT_EQ(params[0], init.vector_double_values()[0][0]);
113  EXPECT_EQ(params[1], init.vector_double_values()[0][1]);
114 }
115 
116 TEST_F(ServicesUtilInitialize, full_init__print_false) {
117  std::vector<std::string> names_r;
118  std::vector<double> values_r;
119  std::vector<std::vector<size_t> > dim_r;
120  names_r.push_back("y");
121  values_r.push_back(6.35149); // 1.5 unconstrained: -10 + 20 * inv.logit(1.5)
122  values_r.push_back(-2.449187); // -0.5 unconstrained
123  std::vector<size_t> d;
124  d.push_back(2);
125  dim_r.push_back(d);
126  stan::io::array_var_context init_context(names_r, values_r, dim_r);
127 
128 
129  std::vector<double> params;
130 
131  double init_radius = 2;
132  bool print_timing = false;
133  params = stan::services::util::initialize(model, init_context, rng,
134  init_radius, print_timing,
135  logger, init);
136  ASSERT_EQ(model.num_params_r(), params.size())
137  << "2 parameters";
138  EXPECT_FLOAT_EQ(1.5, params[0]);
139  EXPECT_FLOAT_EQ(-0.5, params[1]);
140 
141  EXPECT_EQ(0, logger.call_count());
142  ASSERT_EQ(1, init.vector_double_values().size());
143  ASSERT_EQ(2, init.vector_double_values()[0].size());
144  EXPECT_EQ(params[0], init.vector_double_values()[0][0]);
145  EXPECT_EQ(params[1], init.vector_double_values()[0][1]);
146 }
147 
148 TEST_F(ServicesUtilInitialize, full_init__print_true) {
149  std::vector<std::string> names_r;
150  std::vector<double> values_r;
151  std::vector<std::vector<size_t> > dim_r;
152  names_r.push_back("y");
153  values_r.push_back(6.35149); // 1.5 unconstrained: -10 + 20 * inv.logit(1.5)
154  values_r.push_back(-2.449187); // -0.5 unconstrained
155  std::vector<size_t> d;
156  d.push_back(2);
157  dim_r.push_back(d);
158  stan::io::array_var_context init_context(names_r, values_r, dim_r);
159 
160 
161  std::vector<double> params;
162 
163  double init_radius = 2;
164  bool print_timing = true;
165  params = stan::services::util::initialize(model, init_context, rng,
166  init_radius, print_timing,
167  logger, init);
168  ASSERT_EQ(model.num_params_r(), params.size())
169  << "2 parameters";
170  EXPECT_FLOAT_EQ(1.5, params[0]);
171  EXPECT_FLOAT_EQ(-0.5, params[1]);
172 
173  EXPECT_EQ(6, logger.call_count());
174  EXPECT_EQ(6, logger.call_count_info());
175  EXPECT_EQ(1, logger.find_info("Gradient evaluation"));
176  ASSERT_EQ(1, init.vector_double_values().size());
177  ASSERT_EQ(2, init.vector_double_values()[0].size());
178  EXPECT_EQ(params[0], init.vector_double_values()[0][0]);
179  EXPECT_EQ(params[1], init.vector_double_values()[0][1]);
180 }
181 
182 namespace test {
183 // Mock Throwing Model throws exception
185  public:
186 
188  stan::model::prob_grad(1),
189  templated_log_prob_calls(0),
190  transform_inits_calls(0),
191  write_array_calls(0),
192  log_prob_return_value(0.0) { }
193 
194  void reset() {
195  templated_log_prob_calls = 0;
196  transform_inits_calls = 0;
197  write_array_calls = 0;
198  log_prob_return_value = 0.0;
199  }
200 
201  template <bool propto__, bool jacobian__, typename T__>
202  T__ log_prob(std::vector<T__>& params_r__,
203  std::vector<int>& params_i__,
204  std::ostream* pstream__ = 0) const {
205  ++templated_log_prob_calls;
206  throw std::domain_error("throwing within log_prob");
207  return log_prob_return_value;
208  }
209 
210  void transform_inits(const stan::io::var_context& context__,
211  std::vector<int>& params_i__,
212  std::vector<double>& params_r__,
213  std::ostream* pstream__) const {
214  ++transform_inits_calls;
215  for (size_t n = 0; n < params_r__.size(); ++n) {
216  params_r__[n] = n;
217  }
218  }
219 
220  void get_dims(std::vector<std::vector<size_t> >& dimss__) const {
221  dimss__.resize(0);
222  std::vector<size_t> scalar_dim;
223  dimss__.push_back(scalar_dim);
224  }
225 
226  void constrained_param_names(std::vector<std::string>& param_names__,
227  bool include_tparams__ = true,
228  bool include_gqs__ = true) const {
229  param_names__.push_back("theta");
230  }
231 
232  void get_param_names(std::vector<std::string>& names) const {
233  constrained_param_names(names);
234  }
235 
236  void unconstrained_param_names(std::vector<std::string>& param_names__,
237  bool include_tparams__ = true,
238  bool include_gqs__ = true) const {
239  param_names__.clear();
240  for (size_t n = 0; n < num_params_r__; ++n) {
241  std::stringstream param_name;
242  param_name << "param_" << n;
243  param_names__.push_back(param_name.str());
244  }
245  }
246  template <typename RNG>
247  void write_array(RNG& base_rng__,
248  std::vector<double>& params_r__,
249  std::vector<int>& params_i__,
250  std::vector<double>& vars__,
251  bool include_tparams__ = true,
252  bool include_gqs__ = true,
253  std::ostream* pstream__ = 0) const {
254  ++write_array_calls;
255  vars__.resize(0);
256  for (size_t i = 0; i < params_r__.size(); ++i)
257  vars__.push_back(params_r__[i]);
258  }
259 
262  mutable int write_array_calls;
264 };
265 
266 }
267 
268 TEST_F(ServicesUtilInitialize, model_throws__radius_zero) {
269  test::mock_throwing_model throwing_model;
270 
271  double init_radius = 0;
272  bool print_timing = false;
273  EXPECT_THROW(stan::services::util::initialize(throwing_model, empty_context, rng,
274  init_radius, print_timing,
275  logger, init),
277 
278  EXPECT_EQ(3, logger.call_count());
279  EXPECT_EQ(3, logger.call_count_info());
280  EXPECT_EQ(1, logger.find_info("throwing within log_prob"));
281 }
282 
283 TEST_F(ServicesUtilInitialize, model_throws__radius_two) {
284  test::mock_throwing_model throwing_model;
285 
286  double init_radius = 2;
287  bool print_timing = false;
288  EXPECT_THROW(stan::services::util::initialize(throwing_model, empty_context, rng,
289  init_radius, print_timing,
290  logger, init),
292  EXPECT_EQ(303, logger.call_count());
293  EXPECT_EQ(303, logger.call_count_info());
294  EXPECT_EQ(100, logger.find_info("throwing within log_prob"));
295 }
296 
297 TEST_F(ServicesUtilInitialize, model_throws__full_init) {
298  std::vector<std::string> names_r;
299  std::vector<double> values_r;
300  std::vector<std::vector<size_t> > dim_r;
301  names_r.push_back("y");
302  values_r.push_back(6.35149); // 1.5 unconstrained: -10 + 20 * inv.logit(1.5)
303  values_r.push_back(-2.449187); // -0.5 unconstrained
304  std::vector<size_t> d;
305  d.push_back(2);
306  dim_r.push_back(d);
307  stan::io::array_var_context init_context(names_r, values_r, dim_r);
308 
309  test::mock_throwing_model throwing_model;
310 
311  double init_radius = 2;
312  bool print_timing = false;
313  EXPECT_THROW(stan::services::util::initialize(throwing_model, init_context, rng,
314  init_radius, print_timing,
315  logger, init),
317  EXPECT_EQ(303, logger.call_count());
318  EXPECT_EQ(303, logger.call_count_info());
319  EXPECT_EQ(100, logger.find_info("throwing within log_prob"));
320 }
321 
322 
323 namespace test {
324 // Mock Throwing Model throws exception
326  public:
327 
329  stan::model::prob_grad(1),
330  templated_log_prob_calls(0),
331  transform_inits_calls(0),
332  write_array_calls(0),
333  log_prob_return_value(0.0) { }
334 
335  void reset() {
336  templated_log_prob_calls = 0;
337  transform_inits_calls = 0;
338  write_array_calls = 0;
339  log_prob_return_value = 0.0;
340  }
341 
342  template <bool propto__, bool jacobian__, typename T__>
343  T__ log_prob(std::vector<T__>& params_r__,
344  std::vector<int>& params_i__,
345  std::ostream* pstream__ = 0) const {
346  ++templated_log_prob_calls;
347  throw std::out_of_range("out_of_range error in log_prob");
348  return log_prob_return_value;
349  }
350 
351  void transform_inits(const stan::io::var_context& context__,
352  std::vector<int>& params_i__,
353  std::vector<double>& params_r__,
354  std::ostream* pstream__) const {
355  ++transform_inits_calls;
356  for (size_t n = 0; n < params_r__.size(); ++n) {
357  params_r__[n] = n;
358  }
359  }
360 
361  void get_dims(std::vector<std::vector<size_t> >& dimss__) const {
362  dimss__.resize(0);
363  std::vector<size_t> scalar_dim;
364  dimss__.push_back(scalar_dim);
365  }
366 
367  void constrained_param_names(std::vector<std::string>& param_names__,
368  bool include_tparams__ = true,
369  bool include_gqs__ = true) const {
370  param_names__.push_back("theta");
371  }
372 
373  void get_param_names(std::vector<std::string>& names) const {
374  constrained_param_names(names);
375  }
376 
377  void unconstrained_param_names(std::vector<std::string>& param_names__,
378  bool include_tparams__ = true,
379  bool include_gqs__ = true) const {
380  param_names__.clear();
381  for (size_t n = 0; n < num_params_r__; ++n) {
382  std::stringstream param_name;
383  param_name << "param_" << n;
384  param_names__.push_back(param_name.str());
385  }
386  }
387  template <typename RNG>
388  void write_array(RNG& base_rng__,
389  std::vector<double>& params_r__,
390  std::vector<int>& params_i__,
391  std::vector<double>& vars__,
392  bool include_tparams__ = true,
393  bool include_gqs__ = true,
394  std::ostream* pstream__ = 0) const {
395  ++write_array_calls;
396  vars__.resize(0);
397  for (size_t i = 0; i < params_r__.size(); ++i)
398  vars__.push_back(params_r__[i]);
399  }
400 
403  mutable int write_array_calls;
405 };
406 }
407 
408 
409 TEST_F(ServicesUtilInitialize, model_errors__radius_zero) {
410  test::mock_error_model error_model;
411 
412  double init_radius = 0;
413  bool print_timing = false;
415  init_radius, print_timing,
416  logger, init),
418  "out_of_range error in log_prob");
419  EXPECT_EQ(2, logger.call_count());
420  EXPECT_EQ(2, logger.call_count_info());
421  EXPECT_EQ(1, logger.find_info("out_of_range error in log_prob"));
422  EXPECT_EQ(1, logger.find_info("Unrecoverable error evaluating the log probability at the initial value."));
423 }
424 
425 TEST_F(ServicesUtilInitialize, model_errors__radius_two) {
426  test::mock_error_model error_model;
427 
428  double init_radius = 2;
429  bool print_timing = false;
431  init_radius, print_timing,
432  logger, init),
434  "out_of_range error in log_prob");
435  EXPECT_EQ(2, logger.call_count());
436  EXPECT_EQ(2, logger.call_count_info());
437  EXPECT_EQ(1, logger.find_info("out_of_range error in log_prob"));
438 }
439 
440 TEST_F(ServicesUtilInitialize, model_errors__full_init) {
441  std::vector<std::string> names_r;
442  std::vector<double> values_r;
443  std::vector<std::vector<size_t> > dim_r;
444  names_r.push_back("y");
445  values_r.push_back(6.35149); // 1.5 unconstrained: -10 + 20 * inv.logit(1.5)
446  values_r.push_back(-2.449187); // -0.5 unconstrained
447  std::vector<size_t> d;
448  d.push_back(2);
449  dim_r.push_back(d);
450  stan::io::array_var_context init_context(names_r, values_r, dim_r);
451 
452  test::mock_error_model error_model;
453 
454  double init_radius = 2;
455  bool print_timing = false;
456  EXPECT_THROW_MSG(stan::services::util::initialize(error_model, init_context, rng,
457  init_radius, print_timing,
458  logger, init),
460  "out_of_range error in log_prob");
461  EXPECT_EQ(2, logger.call_count());
462  EXPECT_EQ(2, logger.call_count_info());
463  EXPECT_EQ(1, logger.find_info("out_of_range error in log_prob"));
464 }
465 
466 namespace test {
467 // mock_throwing_model_in_write_array throws exception in the write_array()
468 // method
469 class mock_throwing_model_in_write_array: public stan::model::prob_grad {
470  public:
471 
473  stan::model::prob_grad(1),
474  templated_log_prob_calls(0),
475  transform_inits_calls(0),
476  write_array_calls(0),
477  log_prob_return_value(0.0) { }
478 
479  void reset() {
480  templated_log_prob_calls = 0;
481  transform_inits_calls = 0;
482  write_array_calls = 0;
483  log_prob_return_value = 0.0;
484  }
485 
486  template <bool propto__, bool jacobian__, typename T__>
487  T__ log_prob(std::vector<T__>& params_r__,
488  std::vector<int>& params_i__,
489  std::ostream* pstream__ = 0) const {
490  ++templated_log_prob_calls;
491  return log_prob_return_value;
492  }
493 
494  void transform_inits(const stan::io::var_context& context__,
495  std::vector<int>& params_i__,
496  std::vector<double>& params_r__,
497  std::ostream* pstream__) const {
498  ++transform_inits_calls;
499  for (size_t n = 0; n < params_r__.size(); ++n) {
500  params_r__[n] = n;
501  }
502  }
503 
504  void get_dims(std::vector<std::vector<size_t> >& dimss__) const {
505  dimss__.resize(0);
506  std::vector<size_t> scalar_dim;
507  dimss__.push_back(scalar_dim);
508  }
509 
510  void constrained_param_names(std::vector<std::string>& param_names__,
511  bool include_tparams__ = true,
512  bool include_gqs__ = true) const {
513  param_names__.push_back("theta");
514  }
515 
516  void get_param_names(std::vector<std::string>& names) const {
517  constrained_param_names(names);
518  }
519 
520  void unconstrained_param_names(std::vector<std::string>& param_names__,
521  bool include_tparams__ = true,
522  bool include_gqs__ = true) const {
523  param_names__.clear();
524  for (size_t n = 0; n < num_params_r__; ++n) {
525  std::stringstream param_name;
526  param_name << "param_" << n;
527  param_names__.push_back(param_name.str());
528  }
529  }
530  template <typename RNG>
531  void write_array(RNG& base_rng__,
532  std::vector<double>& params_r__,
533  std::vector<int>& params_i__,
534  std::vector<double>& vars__,
535  bool include_tparams__ = true,
536  bool include_gqs__ = true,
537  std::ostream* pstream__ = 0) const {
538  ++write_array_calls;
539  throw std::domain_error("throwing within write_array");
540  vars__.resize(0);
541  for (size_t i = 0; i < params_r__.size(); ++i)
542  vars__.push_back(params_r__[i]);
543  }
544 
545  mutable int templated_log_prob_calls;
546  mutable int transform_inits_calls;
547  mutable int write_array_calls;
548  double log_prob_return_value;
549 };
550 }
551 
552 TEST_F(ServicesUtilInitialize, model_throws_in_write_array__radius_zero) {
554 
555  double init_radius = 0;
556  bool print_timing = false;
557  EXPECT_THROW(stan::services::util::initialize(throwing_model, empty_context, rng,
558  init_radius, print_timing,
559  logger, init),
561 
562  EXPECT_EQ(3, logger.call_count());
563  EXPECT_EQ(3, logger.call_count_info());
564  EXPECT_EQ(1, logger.find_info("throwing within write_array"));
565 }
566 
567 TEST_F(ServicesUtilInitialize, model_throws_in_write_array__radius_two) {
569 
570  double init_radius = 2;
571  bool print_timing = false;
572  EXPECT_THROW(stan::services::util::initialize(throwing_model, empty_context, rng,
573  init_radius, print_timing,
574  logger, init),
576  EXPECT_EQ(303, logger.call_count());
577  EXPECT_EQ(303, logger.call_count_info());
578  EXPECT_EQ(100, logger.find_info("throwing within write_array"));
579 }
580 
581 TEST_F(ServicesUtilInitialize, model_throws_in_write_array__full_init) {
582  std::vector<std::string> names_r;
583  std::vector<double> values_r;
584  std::vector<std::vector<size_t> > dim_r;
585  names_r.push_back("y");
586  values_r.push_back(6.35149); // 1.5 unconstrained: -10 + 20 * inv.logit(1.5)
587  values_r.push_back(-2.449187); // -0.5 unconstrained
588  std::vector<size_t> d;
589  d.push_back(2);
590  dim_r.push_back(d);
591  stan::io::array_var_context init_context(names_r, values_r, dim_r);
592 
594 
595  double init_radius = 2;
596  bool print_timing = false;
597  EXPECT_THROW(stan::services::util::initialize(throwing_model, init_context, rng,
598  init_radius, print_timing,
599  logger, init),
601  EXPECT_EQ(303, logger.call_count());
602  EXPECT_EQ(303, logger.call_count_info());
603  EXPECT_EQ(100, logger.find_info("throwing within write_array"));
604 }
void constrained_param_names(std::vector< std::string > &param_names__, bool include_tparams__=true, bool include_gqs__=true) const
Filter events based on their run/event numbers.
stan::test::unit::instrumented_logger logger
stan::io::empty_var_context empty_context
void transform_inits(const stan::io::var_context &context__, std::vector< int > &params_i__, std::vector< double > &params_r__, std::ostream *pstream__) const
#define EXPECT_THROW_MSG(expr, T_e, msg)
Definition: util.hpp:6
stan::callbacks::stream_writer message
void write_array(RNG &base_rng__, std::vector< double > &params_r__, std::vector< int > &params_i__, std::vector< double > &vars__, bool include_tparams__=true, bool include_gqs__=true, std::ostream *pstream__=0) const
void get_param_names(std::vector< std::string > &names) const
T__ log_prob(std::vector< T__ > &params_r__, std::vector< int > &params_i__, std::ostream *pstream__=0) const
void get_param_names(std::vector< std::string > &names) const
stan::test::unit::instrumented_writer init
void unconstrained_param_names(std::vector< std::string > &param_names__, bool include_tparams__=true, bool include_gqs__=true) const
void get_param_names(std::vector< std::string > &names) const
void transform_inits(const stan::io::var_context &context__, std::vector< int > &params_i__, std::vector< double > &params_r__, std::ostream *pstream__) const
void write_array(RNG &base_rng__, std::vector< double > &params_r__, std::vector< int > &params_i__, std::vector< double > &vars__, bool include_tparams__=true, bool include_gqs__=true, std::ostream *pstream__=0) const
void constrained_param_names(std::vector< std::string > &param_names__, bool include_tparams__=true, bool include_gqs__=true) const
std::stringstream message_ss
Float_t d
Definition: plot.C:236
TEST_F(ServicesUtilInitialize, radius_zero__print_false)
void get_dims(std::vector< std::vector< size_t > > &dimss__) const
std::vector< double > initialize(Model &model, stan::io::var_context &init, RNG &rng, double init_radius, bool print_timing, stan::callbacks::logger &logger, stan::callbacks::writer &init_writer)
Definition: initialize.hpp:68
void transform_inits(const stan::io::var_context &context__, std::vector< int > &params_i__, std::vector< double > &params_r__, std::ostream *pstream__) const
void out_of_range(const char *function, int max, int index, const char *msg1="", const char *msg2="")
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
boost::ecuyer1988 rng
void unconstrained_param_names(std::vector< std::string > &param_names__, bool include_tparams__=true, bool include_gqs__=true) const
T__ log_prob(std::vector< T__ > &params_r__, std::vector< int > &params_i__, std::ostream *pstream__=0) const
std::vector< std::vector< double > > vector_double_values()
void unconstrained_param_names(std::vector< std::string > &param_names__, bool include_tparams__=true, bool include_gqs__=true) const
T__ log_prob(std::vector< T__ > &params_r__, std::vector< int > &params_i__, std::ostream *pstream__=0) const
void get_dims(std::vector< std::vector< size_t > > &dimss__) const
unsigned int find_info(const std::string &msg)
const XML_Char XML_Content * model
Definition: expat.h:151
void write_array(RNG &base_rng__, std::vector< double > &params_r__, std::vector< int > &params_i__, std::vector< double > &vars__, bool include_tparams__=true, bool include_gqs__=true, std::ostream *pstream__=0) const
boost::ecuyer1988 create_rng(unsigned int seed, unsigned int chain)
Definition: create_rng.hpp:25
void get_dims(std::vector< std::vector< size_t > > &dimss__) const
std::stringstream model_ss
void constrained_param_names(std::vector< std::string > &param_names__, bool include_tparams__=true, bool include_gqs__=true) const