@@ -6,18 +6,18 @@ using namespace stan::math;
6
6
stan::math::profile_map profiles__;
7
7
static constexpr std::array<const char *, 13 > locations_array__ =
8
8
{" (found before start of program)" ,
9
- " (in 'include/estimator/estimator.stan', line 15, column 2 to column 61 )" ,
10
- " (in 'include/estimator/estimator.stan', line 19, column 2 to column 95)" ,
11
- " (in 'include/estimator/estimator.stan', line 6, column 2 to column 12)" ,
12
- " (in 'include/estimator/estimator.stan', line 7, column 2 to column 18)" ,
13
- " (in 'include/estimator/estimator.stan', line 8, column 2 to column 16)" ,
14
- " (in 'include/estimator/estimator.stan', line 9, column 8 to column 13)" ,
15
- " (in 'include/estimator/estimator.stan', line 9, column 2 to column 32)" ,
16
- " (in 'include/estimator/estimator.stan', line 10, column 9 to column 14)" ,
17
- " (in 'include/estimator/estimator.stan', line 10, column 2 to column 29)" ,
18
- " (in 'include/estimator/estimator.stan', line 11, column 9 to column 14)" ,
19
- " (in 'include/estimator/estimator.stan', line 11, column 2 to column 29)" ,
20
- " (in 'include/estimator/estimator.stan', line 15, column 49 to column 54 )" };
9
+ " (in 'inst/ include/estimator/estimator.stan', line 15, column 2 to column 21 )" ,
10
+ " (in 'inst/ include/estimator/estimator.stan', line 19, column 2 to column 95)" ,
11
+ " (in 'inst/ include/estimator/estimator.stan', line 6, column 2 to column 12)" ,
12
+ " (in 'inst/ include/estimator/estimator.stan', line 7, column 2 to column 18)" ,
13
+ " (in 'inst/ include/estimator/estimator.stan', line 8, column 2 to column 16)" ,
14
+ " (in 'inst/ include/estimator/estimator.stan', line 9, column 8 to column 13)" ,
15
+ " (in 'inst/ include/estimator/estimator.stan', line 9, column 2 to column 32)" ,
16
+ " (in 'inst/ include/estimator/estimator.stan', line 10, column 9 to column 14)" ,
17
+ " (in 'inst/ include/estimator/estimator.stan', line 10, column 2 to column 29)" ,
18
+ " (in 'inst/ include/estimator/estimator.stan', line 11, column 9 to column 14)" ,
19
+ " (in 'inst/ include/estimator/estimator.stan', line 11, column 2 to column 29)" ,
20
+ " (in 'inst/ include/estimator/estimator.stan', line 15, column 9 to column 14 )" };
21
21
class estimator_model final : public model_base_crtp<estimator_model> {
22
22
private:
23
23
int Npars;
@@ -48,7 +48,7 @@ class estimator_model final : public model_base_crtp<estimator_model> {
48
48
// suppress unused var warning
49
49
(void ) DUMMY_VAR__;
50
50
try {
51
- int pos__;
51
+ int pos__ = std::numeric_limits< int >:: min () ;
52
52
pos__ = 1 ;
53
53
current_statement__ = 3 ;
54
54
context__.validate_dims (" data initialization" , " Npars" , " int" ,
@@ -130,7 +130,7 @@ class estimator_model final : public model_base_crtp<estimator_model> {
130
130
}
131
131
inline std::vector<std::string> model_compile_info () const noexcept {
132
132
return std::vector<std::string>{" stanc_version = stanc3 v2.35.0" ,
133
- " stancflags = --O1 -- allow-undefined" };
133
+ " stancflags = --allow-undefined" };
134
134
}
135
135
// Base log prob
136
136
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
@@ -156,20 +156,13 @@ class estimator_model final : public model_base_crtp<estimator_model> {
156
156
// suppress unused var warning
157
157
(void ) function__;
158
158
try {
159
- Eigen::Matrix<local_scalar_t__,-1 ,1 > pars;
160
- current_statement__ = 1 ;
161
- pars = in__.template read_constrain_lub <
162
- Eigen::Matrix<local_scalar_t__,-1 ,1 >,
163
- jacobian__>(lower_bounds, upper_bounds, lp__, Npars);
164
- current_statement__ = 1 ;
165
- stan::math::check_matching_dims (" constraint" , " pars" , pars, " lower" ,
166
- lower_bounds);
159
+ Eigen::Matrix<local_scalar_t__,-1 ,1 > pars =
160
+ Eigen::Matrix<local_scalar_t__,-1 ,1 >::Constant (Npars, DUMMY_VAR__);
167
161
current_statement__ = 1 ;
168
- stan::math::check_matching_dims (" constraint" , " pars" , pars, " upper" ,
169
- upper_bounds);
162
+ pars = in__.template read <Eigen::Matrix<local_scalar_t__,-1 ,1 >>(Npars);
170
163
{
171
164
current_statement__ = 2 ;
172
- lp_accum__.add (r_function (pars, finite_diff, no_bounds, bounds_types,
165
+ lp_accum__.add (r_function<jacobian__> (pars, finite_diff, no_bounds, bounds_types,
173
166
lower_bounds, upper_bounds, pstream__));
174
167
}
175
168
} catch (const std::exception & e) {
@@ -202,20 +195,13 @@ class estimator_model final : public model_base_crtp<estimator_model> {
202
195
// suppress unused var warning
203
196
(void ) function__;
204
197
try {
205
- Eigen::Matrix<local_scalar_t__,-1 ,1 > pars;
206
- current_statement__ = 1 ;
207
- pars = in__.template read_constrain_lub <
208
- Eigen::Matrix<local_scalar_t__,-1 ,1 >,
209
- jacobian__>(lower_bounds, upper_bounds, lp__, Npars);
210
- current_statement__ = 1 ;
211
- stan::math::check_matching_dims (" constraint" , " pars" , pars, " lower" ,
212
- lower_bounds);
198
+ Eigen::Matrix<local_scalar_t__,-1 ,1 > pars =
199
+ Eigen::Matrix<local_scalar_t__,-1 ,1 >::Constant (Npars, DUMMY_VAR__);
213
200
current_statement__ = 1 ;
214
- stan::math::check_matching_dims (" constraint" , " pars" , pars, " upper" ,
215
- upper_bounds);
201
+ pars = in__.template read <Eigen::Matrix<local_scalar_t__,-1 ,1 >>(Npars);
216
202
{
217
203
current_statement__ = 2 ;
218
- lp_accum__.add (r_function (pars, finite_diff, no_bounds, bounds_types,
204
+ lp_accum__.add (r_function<jacobian__> (pars, finite_diff, no_bounds, bounds_types,
219
205
lower_bounds, upper_bounds, pstream__));
220
206
}
221
207
} catch (const std::exception & e) {
@@ -259,17 +245,11 @@ class estimator_model final : public model_base_crtp<estimator_model> {
259
245
// suppress unused var warning
260
246
(void ) function__;
261
247
try {
262
- Eigen::Matrix<double ,-1 ,1 > pars;
263
- current_statement__ = 1 ;
264
- pars = in__.template read_constrain_lub <
265
- Eigen::Matrix<local_scalar_t__,-1 ,1 >,
266
- jacobian__>(lower_bounds, upper_bounds, lp__, Npars);
248
+ Eigen::Matrix<double ,-1 ,1 > pars =
249
+ Eigen::Matrix<double ,-1 ,1 >::Constant (Npars,
250
+ std::numeric_limits<double >::quiet_NaN ());
267
251
current_statement__ = 1 ;
268
- stan::math::check_matching_dims (" constraint" , " pars" , pars, " lower" ,
269
- lower_bounds);
270
- current_statement__ = 1 ;
271
- stan::math::check_matching_dims (" constraint" , " pars" , pars, " upper" ,
272
- upper_bounds);
252
+ pars = in__.template read <Eigen::Matrix<local_scalar_t__,-1 ,1 >>(Npars);
273
253
out__.write (pars);
274
254
if (stan::math::logical_negation (
275
255
(stan::math::primitive_value (emit_transformed_parameters__) ||
@@ -299,12 +279,13 @@ class estimator_model final : public model_base_crtp<estimator_model> {
299
279
// suppress unused var warning
300
280
(void ) DUMMY_VAR__;
301
281
try {
302
- Eigen::Matrix<local_scalar_t__,-1 ,1 > pars;
282
+ Eigen::Matrix<local_scalar_t__,-1 ,1 > pars =
283
+ Eigen::Matrix<local_scalar_t__,-1 ,1 >::Constant (Npars, DUMMY_VAR__);
303
284
current_statement__ = 1 ;
304
285
stan::model::assign (pars,
305
286
in__.read <Eigen::Matrix<local_scalar_t__,-1 ,1 >>(Npars),
306
287
" assigning variable pars" );
307
- out__.write_free_lub (lower_bounds, upper_bounds, pars);
288
+ out__.write ( pars);
308
289
} catch (const std::exception & e) {
309
290
stan::lang::rethrow_located (e, locations_array__[current_statement__]);
310
291
}
@@ -325,7 +306,7 @@ class estimator_model final : public model_base_crtp<estimator_model> {
325
306
current_statement__ = 1 ;
326
307
context__.validate_dims (" parameter initialization" , " pars" , " double" ,
327
308
std::vector<size_t >{static_cast <size_t >(Npars)});
328
- int pos__;
309
+ int pos__ = std::numeric_limits< int >:: min () ;
329
310
pos__ = 1 ;
330
311
Eigen::Matrix<local_scalar_t__,-1 ,1 > pars =
331
312
Eigen::Matrix<local_scalar_t__,-1 ,1 >::Constant (Npars, DUMMY_VAR__);
@@ -340,7 +321,7 @@ class estimator_model final : public model_base_crtp<estimator_model> {
340
321
pos__ = (pos__ + 1 );
341
322
}
342
323
}
343
- out__.write_free_lub (lower_bounds, upper_bounds, pars);
324
+ out__.write ( pars);
344
325
} catch (const std::exception & e) {
345
326
stan::lang::rethrow_located (e, locations_array__[current_statement__]);
346
327
}
0 commit comments