Created
March 19, 2019 09:44
-
-
Save seantalts/67d015ae950c1505cd91a4a42eb8ade6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated by Stan version 2.18.1 | |
#include <stan/model/model_header.hpp> | |
namespace gentest_mother1_model_namespace { | |
using std::istream; | |
using std::string; | |
using std::stringstream; | |
using std::vector; | |
using stan::io::dump; | |
using stan::math::lgamma; | |
using stan::model::prob_grad; | |
using namespace stan::math; | |
static int current_statement_begin__; | |
stan::io::program_reader prog_reader__() { | |
stan::io::program_reader reader; | |
reader.add_event(0, 0, "start", "gentest_mother1.stan"); | |
reader.add_event(319, 317, "end", "gentest_mother1.stan"); | |
return reader; | |
} | |
int | |
foo(const int& n, std::ostream* pstream__); | |
int | |
foo(const int& n, std::ostream* pstream__) { | |
typedef double local_scalar_t__; | |
typedef int fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 13; | |
if (as_bool(logical_eq(n, 0))) { | |
current_statement_begin__ = 13; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(1); | |
} | |
current_statement_begin__ = 14; | |
return stan::math::promote_scalar<fun_return_scalar_t__>((n * foo((n - 1), pstream__))); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_functor__ { | |
int | |
operator()(const int& n, std::ostream* pstream__) const { | |
return foo(n, pstream__); | |
} | |
}; | |
template <typename T0__, typename T1__, typename T2__, typename T3__> | |
std::vector<typename boost::math::tools::promote_args<T0__, T1__, T2__, T3__>::type> | |
sho(const T0__& t, | |
const std::vector<T1__>& y, | |
const std::vector<T2__>& theta, | |
const std::vector<T3__>& x, | |
const std::vector<int>& x_int, std::ostream* pstream__); | |
template <typename T0__, typename T1__, typename T2__, typename T3__> | |
std::vector<typename boost::math::tools::promote_args<T0__, T1__, T2__, T3__>::type> | |
sho(const T0__& t, | |
const std::vector<T1__>& y, | |
const std::vector<T2__>& theta, | |
const std::vector<T3__>& x, | |
const std::vector<int>& x_int, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T0__, T1__, T2__, T3__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
{ | |
current_statement_begin__ = 29; | |
validate_non_negative_index("dydt", "2", 2); | |
std::vector<local_scalar_t__ > dydt(2, local_scalar_t__(DUMMY_VAR__)); | |
stan::math::initialize(dydt, DUMMY_VAR__); | |
stan::math::fill(dydt, DUMMY_VAR__); | |
current_statement_begin__ = 30; | |
stan::model::assign(dydt, | |
stan::model::cons_list(stan::model::index_uni(1), stan::model::nil_index_list()), | |
get_base1(y,2,"y",1), | |
"assigning variable dydt"); | |
current_statement_begin__ = 31; | |
stan::model::assign(dydt, | |
stan::model::cons_list(stan::model::index_uni(2), stan::model::nil_index_list()), | |
(-(get_base1(y,1,"y",1)) - (get_base1(theta,1,"theta",1) * get_base1(y,2,"y",1))), | |
"assigning variable dydt"); | |
current_statement_begin__ = 32; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(dydt); | |
} | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct sho_functor__ { | |
template <typename T0__, typename T1__, typename T2__, typename T3__> | |
std::vector<typename boost::math::tools::promote_args<T0__, T1__, T2__, T3__>::type> | |
operator()(const T0__& t, | |
const std::vector<T1__>& y, | |
const std::vector<T2__>& theta, | |
const std::vector<T3__>& x, | |
const std::vector<int>& x_int, std::ostream* pstream__) const { | |
return sho(t, y, theta, x, x_int, pstream__); | |
} | |
}; | |
double | |
foo_bar0(std::ostream* pstream__) { | |
typedef double local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 36; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(0.0); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_bar0_functor__ { | |
double | |
operator()(std::ostream* pstream__) const { | |
return foo_bar0(pstream__); | |
} | |
}; | |
template <typename T0__> | |
typename boost::math::tools::promote_args<T0__>::type | |
foo_bar1(const T0__& x, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T0__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 40; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(1.0); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_bar1_functor__ { | |
template <typename T0__> | |
typename boost::math::tools::promote_args<T0__>::type | |
operator()(const T0__& x, std::ostream* pstream__) const { | |
return foo_bar1(x, pstream__); | |
} | |
}; | |
template <typename T0__, typename T1__> | |
typename boost::math::tools::promote_args<T0__, T1__>::type | |
foo_bar2(const T0__& x, | |
const T1__& y, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T0__, T1__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 44; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(2.0); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_bar2_functor__ { | |
template <typename T0__, typename T1__> | |
typename boost::math::tools::promote_args<T0__, T1__>::type | |
operator()(const T0__& x, | |
const T1__& y, std::ostream* pstream__) const { | |
return foo_bar2(x, y, pstream__); | |
} | |
}; | |
template <bool propto, typename T1__> | |
typename boost::math::tools::promote_args<T1__>::type | |
foo_lpmf(const int& y, | |
const T1__& lambda, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T1__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 48; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(1.0); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
template <typename T1__> | |
typename boost::math::tools::promote_args<T1__>::type | |
foo_lpmf(const int& y, | |
const T1__& lambda, std::ostream* pstream__) { | |
return foo_lpmf<false>(y,lambda, pstream__); | |
} | |
struct foo_lpmf_functor__ { | |
template <bool propto, typename T1__> | |
typename boost::math::tools::promote_args<T1__>::type | |
operator()(const int& y, | |
const T1__& lambda, std::ostream* pstream__) const { | |
return foo_lpmf(y, lambda, pstream__); | |
} | |
}; | |
template <typename T1__> | |
typename boost::math::tools::promote_args<T1__>::type | |
foo_lcdf(const int& y, | |
const T1__& lambda, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T1__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 52; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(1.0); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_lcdf_functor__ { | |
template <typename T1__> | |
typename boost::math::tools::promote_args<T1__>::type | |
operator()(const int& y, | |
const T1__& lambda, std::ostream* pstream__) const { | |
return foo_lcdf(y, lambda, pstream__); | |
} | |
}; | |
template <typename T1__> | |
typename boost::math::tools::promote_args<T1__>::type | |
foo_lccdf(const int& y, | |
const T1__& lambda, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T1__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 56; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(1.0); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_lccdf_functor__ { | |
template <typename T1__> | |
typename boost::math::tools::promote_args<T1__>::type | |
operator()(const int& y, | |
const T1__& lambda, std::ostream* pstream__) const { | |
return foo_lccdf(y, lambda, pstream__); | |
} | |
}; | |
template <typename T0__, typename T_lp__, typename T_lp_accum__> | |
void | |
unit_normal_lp(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T0__, T_lp__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 60; | |
lp_accum__.add(normal_log(u, 0, 1)); | |
current_statement_begin__ = 61; | |
lp_accum__.add(uniform_log<propto__>(u, -(100), 100)); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct unit_normal_lp_functor__ { | |
template <typename T0__, typename T_lp__, typename T_lp_accum__> | |
void | |
operator()(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) const { | |
return unit_normal_lp(u, lp__, lp_accum__, pstream__); | |
} | |
}; | |
int | |
foo_1(const int& a, std::ostream* pstream__) { | |
typedef double local_scalar_t__; | |
typedef int fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 66; | |
while (as_bool(1)) { | |
current_statement_begin__ = 66; | |
break; | |
} | |
current_statement_begin__ = 67; | |
while (as_bool(0)) { | |
current_statement_begin__ = 67; | |
continue; | |
} | |
current_statement_begin__ = 70; | |
for (int i = 1; i <= 10; ++i) { | |
current_statement_begin__ = 70; | |
break; | |
} | |
current_statement_begin__ = 71; | |
for (int i = 1; i <= 10; ++i) { | |
current_statement_begin__ = 71; | |
continue; | |
} | |
current_statement_begin__ = 74; | |
while (as_bool(1)) { | |
{ | |
current_statement_begin__ = 75; | |
int b(0); | |
(void) b; // dummy to suppress unused var warning | |
stan::math::fill(b, std::numeric_limits<int>::min()); | |
current_statement_begin__ = 76; | |
stan::math::assign(b, 5); | |
current_statement_begin__ = 77; | |
break; | |
} | |
} | |
current_statement_begin__ = 81; | |
while (as_bool(1)) { | |
current_statement_begin__ = 82; | |
if (as_bool(0)) { | |
current_statement_begin__ = 82; | |
break; | |
} else if (as_bool(1)) { | |
current_statement_begin__ = 83; | |
break; | |
} else { | |
current_statement_begin__ = 84; | |
break; | |
} | |
} | |
current_statement_begin__ = 88; | |
while (as_bool(1)) { | |
current_statement_begin__ = 88; | |
while (as_bool(0)) { | |
current_statement_begin__ = 88; | |
break; | |
} | |
} | |
current_statement_begin__ = 91; | |
while (as_bool(1)) { | |
current_statement_begin__ = 92; | |
for (int i = 1; i <= 10; ++i) { | |
current_statement_begin__ = 92; | |
break; | |
} | |
} | |
current_statement_begin__ = 96; | |
while (as_bool(1)) { | |
{ | |
current_statement_begin__ = 97; | |
validate_non_negative_index("vs", "2", 2); | |
validate_non_negative_index("vs", "3", 3); | |
std::vector<std::vector<int > > vs(2, std::vector<int>(3, int(0))); | |
stan::math::fill(vs, std::numeric_limits<int>::min()); | |
current_statement_begin__ = 98; | |
int z(0); | |
(void) z; // dummy to suppress unused var warning | |
stan::math::fill(z, std::numeric_limits<int>::min()); | |
current_statement_begin__ = 99; | |
for (auto& v : vs) { | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 100; | |
stan::math::assign(z, 0); | |
current_statement_begin__ = 101; | |
break; | |
} | |
current_statement_begin__ = 103; | |
for (auto& v : vs) { | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 104; | |
stan::math::assign(z, 0); | |
current_statement_begin__ = 105; | |
continue; | |
} | |
current_statement_begin__ = 107; | |
for (auto& v : vs) { | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 108; | |
for (auto& vv : v) { | |
(void) vv; // dummy to suppress unused var warning | |
current_statement_begin__ = 109; | |
stan::math::assign(z, 0); | |
current_statement_begin__ = 110; | |
break; | |
} | |
current_statement_begin__ = 112; | |
stan::math::assign(z, 1); | |
} | |
} | |
} | |
current_statement_begin__ = 117; | |
while (as_bool(1)) { | |
{ | |
current_statement_begin__ = 118; | |
local_scalar_t__ z(DUMMY_VAR__); | |
(void) z; // dummy to suppress unused var warning | |
stan::math::initialize(z, DUMMY_VAR__); | |
stan::math::fill(z, DUMMY_VAR__); | |
current_statement_begin__ = 119; | |
validate_non_negative_index("vs", "2", 2); | |
validate_non_negative_index("vs", "3", 3); | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> vs(2, 3); | |
stan::math::initialize(vs, DUMMY_VAR__); | |
stan::math::fill(vs, DUMMY_VAR__); | |
current_statement_begin__ = 120; | |
for (auto v__loopid = vs.data(); v__loopid < vs.data() + vs.size(); ++v__loopid) { | |
auto& v = *(v__loopid); | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 121; | |
stan::math::assign(z, 0); | |
current_statement_begin__ = 122; | |
break; | |
} | |
current_statement_begin__ = 124; | |
for (auto v__loopid = vs.data(); v__loopid < vs.data() + vs.size(); ++v__loopid) { | |
auto& v = *(v__loopid); | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 125; | |
stan::math::assign(z, 3.1); | |
current_statement_begin__ = 126; | |
continue; | |
} | |
} | |
} | |
current_statement_begin__ = 131; | |
while (as_bool(1)) { | |
{ | |
current_statement_begin__ = 132; | |
local_scalar_t__ z(DUMMY_VAR__); | |
(void) z; // dummy to suppress unused var warning | |
stan::math::initialize(z, DUMMY_VAR__); | |
stan::math::fill(z, DUMMY_VAR__); | |
current_statement_begin__ = 133; | |
validate_non_negative_index("vs", "2", 2); | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> vs(2); | |
stan::math::initialize(vs, DUMMY_VAR__); | |
stan::math::fill(vs, DUMMY_VAR__); | |
current_statement_begin__ = 134; | |
for (auto v__loopid = vs.data(); v__loopid < vs.data() + vs.size(); ++v__loopid) { | |
auto& v = *(v__loopid); | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 135; | |
stan::math::assign(z, 0); | |
current_statement_begin__ = 136; | |
break; | |
} | |
current_statement_begin__ = 138; | |
for (auto v__loopid = vs.data(); v__loopid < vs.data() + vs.size(); ++v__loopid) { | |
auto& v = *(v__loopid); | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 139; | |
stan::math::assign(z, 3.2); | |
current_statement_begin__ = 140; | |
continue; | |
} | |
} | |
} | |
current_statement_begin__ = 145; | |
while (as_bool(1)) { | |
{ | |
current_statement_begin__ = 146; | |
local_scalar_t__ z(DUMMY_VAR__); | |
(void) z; // dummy to suppress unused var warning | |
stan::math::initialize(z, DUMMY_VAR__); | |
stan::math::fill(z, DUMMY_VAR__); | |
current_statement_begin__ = 147; | |
validate_non_negative_index("vs", "2", 2); | |
Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> vs(2); | |
stan::math::initialize(vs, DUMMY_VAR__); | |
stan::math::fill(vs, DUMMY_VAR__); | |
current_statement_begin__ = 148; | |
for (auto v__loopid = vs.data(); v__loopid < vs.data() + vs.size(); ++v__loopid) { | |
auto& v = *(v__loopid); | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 149; | |
stan::math::assign(z, 0); | |
current_statement_begin__ = 150; | |
break; | |
} | |
current_statement_begin__ = 152; | |
for (auto v__loopid = vs.data(); v__loopid < vs.data() + vs.size(); ++v__loopid) { | |
auto& v = *(v__loopid); | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 153; | |
stan::math::assign(z, 3.3); | |
current_statement_begin__ = 154; | |
continue; | |
} | |
} | |
} | |
current_statement_begin__ = 159; | |
while (as_bool(1)) { | |
{ | |
current_statement_begin__ = 160; | |
int b(0); | |
(void) b; // dummy to suppress unused var warning | |
stan::math::fill(b, std::numeric_limits<int>::min()); | |
current_statement_begin__ = 161; | |
stan::math::assign(b, 5); | |
{ | |
current_statement_begin__ = 163; | |
int c(0); | |
(void) c; // dummy to suppress unused var warning | |
stan::math::fill(c, std::numeric_limits<int>::min()); | |
current_statement_begin__ = 164; | |
stan::math::assign(c, 6); | |
current_statement_begin__ = 165; | |
break; | |
} | |
} | |
} | |
current_statement_begin__ = 169; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(0); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_1_functor__ { | |
int | |
operator()(const int& a, std::ostream* pstream__) const { | |
return foo_1(a, pstream__); | |
} | |
}; | |
int | |
foo_2(const int& a, std::ostream* pstream__) { | |
typedef double local_scalar_t__; | |
typedef int fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
{ | |
current_statement_begin__ = 173; | |
validate_non_negative_index("vs", "2", 2); | |
std::vector<int > vs(2, int(0)); | |
stan::math::fill(vs, std::numeric_limits<int>::min()); | |
current_statement_begin__ = 174; | |
int y(0); | |
(void) y; // dummy to suppress unused var warning | |
stan::math::fill(y, std::numeric_limits<int>::min()); | |
current_statement_begin__ = 175; | |
for (auto& v : vs) { | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 175; | |
stan::math::assign(y, v); | |
} | |
current_statement_begin__ = 176; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(0); | |
} | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_2_functor__ { | |
int | |
operator()(const int& a, std::ostream* pstream__) const { | |
return foo_2(a, pstream__); | |
} | |
}; | |
template <typename T0__> | |
std::vector<typename boost::math::tools::promote_args<T0__>::type> | |
foo_3(const T0__& t, | |
const int& n, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T0__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 180; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(rep_array(t, n)); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_3_functor__ { | |
template <typename T0__> | |
std::vector<typename boost::math::tools::promote_args<T0__>::type> | |
operator()(const T0__& t, | |
const int& n, std::ostream* pstream__) const { | |
return foo_3(t, n, pstream__); | |
} | |
}; | |
template <typename T0__, typename T_lp__, typename T_lp_accum__> | |
typename boost::math::tools::promote_args<T0__, T_lp__>::type | |
foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T0__, T_lp__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 184; | |
return stan::math::promote_scalar<fun_return_scalar_t__>((x + get_lp(lp__, lp_accum__))); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_lp_functor__ { | |
template <typename T0__, typename T_lp__, typename T_lp_accum__> | |
typename boost::math::tools::promote_args<T0__, T_lp__>::type | |
operator()(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) const { | |
return foo_lp(x, lp__, lp_accum__, pstream__); | |
} | |
}; | |
template <typename T0__> | |
void | |
foo_4(const T0__& x, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T0__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 188; | |
std::stringstream errmsg_stream__; | |
errmsg_stream__ << "user-specified rejection"; | |
throw std::domain_error(errmsg_stream__.str()); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_4_functor__ { | |
template <typename T0__> | |
void | |
operator()(const T0__& x, std::ostream* pstream__) const { | |
return foo_4(x, pstream__); | |
} | |
}; | |
template <typename T0__, typename T1__, typename T2__, typename T3__> | |
typename boost::math::tools::promote_args<T0__, T1__, T2__, T3__>::type | |
relative_diff(const T0__& x, | |
const T1__& y, | |
const T2__& max_, | |
const T3__& min_, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T0__, T1__, T2__, T3__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
{ | |
current_statement_begin__ = 192; | |
local_scalar_t__ abs_diff(DUMMY_VAR__); | |
(void) abs_diff; // dummy to suppress unused var warning | |
stan::math::initialize(abs_diff, DUMMY_VAR__); | |
stan::math::fill(abs_diff, DUMMY_VAR__); | |
current_statement_begin__ = 193; | |
local_scalar_t__ avg_scale(DUMMY_VAR__); | |
(void) avg_scale; // dummy to suppress unused var warning | |
stan::math::initialize(avg_scale, DUMMY_VAR__); | |
stan::math::fill(avg_scale, DUMMY_VAR__); | |
current_statement_begin__ = 194; | |
stan::math::assign(abs_diff, stan::math::fabs((x - y))); | |
current_statement_begin__ = 195; | |
stan::math::assign(avg_scale, ((stan::math::fabs(x) + stan::math::fabs(y)) / 2)); | |
current_statement_begin__ = 196; | |
if (as_bool(logical_gt((abs_diff / avg_scale), max_))) { | |
current_statement_begin__ = 197; | |
std::stringstream errmsg_stream__; | |
errmsg_stream__ << "user-specified rejection, difference above "; | |
errmsg_stream__ << max_; | |
errmsg_stream__ << " x:"; | |
errmsg_stream__ << x; | |
errmsg_stream__ << " y:"; | |
errmsg_stream__ << y; | |
throw std::domain_error(errmsg_stream__.str()); | |
} | |
current_statement_begin__ = 198; | |
if (as_bool(logical_lt((abs_diff / avg_scale), min_))) { | |
current_statement_begin__ = 199; | |
std::stringstream errmsg_stream__; | |
errmsg_stream__ << "user-specified rejection, difference below "; | |
errmsg_stream__ << min_; | |
errmsg_stream__ << " x:"; | |
errmsg_stream__ << x; | |
errmsg_stream__ << " y:"; | |
errmsg_stream__ << y; | |
throw std::domain_error(errmsg_stream__.str()); | |
} | |
current_statement_begin__ = 200; | |
return stan::math::promote_scalar<fun_return_scalar_t__>((abs_diff / avg_scale)); | |
} | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct relative_diff_functor__ { | |
template <typename T0__, typename T1__, typename T2__, typename T3__> | |
typename boost::math::tools::promote_args<T0__, T1__, T2__, T3__>::type | |
operator()(const T0__& x, | |
const T1__& y, | |
const T2__& max_, | |
const T3__& min_, std::ostream* pstream__) const { | |
return relative_diff(x, y, max_, min_, pstream__); | |
} | |
}; | |
template <typename T0__, typename T1__, typename T2__> | |
Eigen::Matrix<typename boost::math::tools::promote_args<T0__, T1__, T2__>::type, Eigen::Dynamic, 1> | |
foo_5(const Eigen::Matrix<T0__, Eigen::Dynamic, 1>& shared_params, | |
const Eigen::Matrix<T1__, Eigen::Dynamic, 1>& job_params, | |
const std::vector<T2__>& data_r, | |
const std::vector<int>& data_i, std::ostream* pstream__) { | |
typedef typename boost::math::tools::promote_args<T0__, T1__, T2__>::type local_scalar_t__; | |
typedef local_scalar_t__ fun_return_scalar_t__; | |
const static bool propto__ = true; | |
(void) propto__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
int current_statement_begin__ = -1; | |
try { | |
current_statement_begin__ = 205; | |
return stan::math::promote_scalar<fun_return_scalar_t__>(transpose(stan::math::to_row_vector(stan::math::array_builder<local_scalar_t__ >().add(1).add(2).add(3).array()))); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
struct foo_5_functor__ { | |
template <typename T0__, typename T1__, typename T2__> | |
Eigen::Matrix<typename boost::math::tools::promote_args<T0__, T1__, T2__>::type, Eigen::Dynamic, 1> | |
operator()(const Eigen::Matrix<T0__, Eigen::Dynamic, 1>& shared_params, | |
const Eigen::Matrix<T1__, Eigen::Dynamic, 1>& job_params, | |
const std::vector<T2__>& data_r, | |
const std::vector<int>& data_i, std::ostream* pstream__) const { | |
return foo_5(shared_params, job_params, data_r, data_i, pstream__); | |
} | |
}; | |
class gentest_mother1_model : public prob_grad { | |
private: | |
int N; | |
int M; | |
int K; | |
std::vector<int> d_int_1d_ar; | |
std::vector<std::vector<std::vector<int> > > d_int_3d_ar; | |
double J; | |
std::vector<double> d_real_1d_ar; | |
std::vector<std::vector<std::vector<double> > > d_real_3d_ar; | |
vector_d d_vec; | |
std::vector<vector_d> d_1d_vec; | |
std::vector<std::vector<std::vector<vector_d> > > d_3d_vec; | |
row_vector_d d_row_vec; | |
std::vector<row_vector_d> d_1d_row_vec; | |
std::vector<std::vector<std::vector<row_vector_d> > > d_3d_row_vec; | |
std::vector<std::vector<matrix_d> > d_ar_mat; | |
vector_d d_simplex; | |
std::vector<vector_d> d_1d_simplex; | |
std::vector<std::vector<std::vector<vector_d> > > d_3d_simplex; | |
matrix_d d_cfcov_54; | |
matrix_d d_cfcov_33; | |
std::vector<matrix_d> d_cfcov_33_ar; | |
int td_a; | |
double td_b; | |
double td_c; | |
std::vector<std::vector<matrix_d> > td_ar_mat; | |
vector_d td_simplex; | |
std::vector<vector_d> td_1d_simplex; | |
std::vector<std::vector<std::vector<vector_d> > > td_3d_simplex; | |
matrix_d td_cfcov_54; | |
matrix_d td_cfcov_33; | |
public: | |
gentest_mother1_model(stan::io::var_context& context__, | |
std::ostream* pstream__ = 0) | |
: prob_grad(0) { | |
ctor_body(context__, 0, pstream__); | |
} | |
gentest_mother1_model(stan::io::var_context& context__, | |
unsigned int random_seed__, | |
std::ostream* pstream__ = 0) | |
: prob_grad(0) { | |
ctor_body(context__, random_seed__, pstream__); | |
} | |
void ctor_body(stan::io::var_context& context__, | |
unsigned int random_seed__, | |
std::ostream* pstream__) { | |
typedef double local_scalar_t__; | |
boost::ecuyer1988 base_rng__ = | |
stan::services::util::create_rng(random_seed__, 0); | |
(void) base_rng__; // suppress unused var warning | |
current_statement_begin__ = -1; | |
static const char* function__ = "gentest_mother1_model_namespace::gentest_mother1_model"; | |
(void) function__; // dummy to suppress unused var warning | |
size_t pos__; | |
(void) pos__; // dummy to suppress unused var warning | |
std::vector<int> vals_i__; | |
std::vector<double> vals_r__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
try { | |
// initialize data block variables from context__ | |
current_statement_begin__ = 209; | |
context__.validate_dims("data initialization", "N", "int", context__.to_vec()); | |
N = int(0); | |
vals_i__ = context__.vals_i("N"); | |
pos__ = 0; | |
N = vals_i__[pos__++]; | |
check_greater_or_equal(function__, "N", N, 0); | |
current_statement_begin__ = 210; | |
context__.validate_dims("data initialization", "M", "int", context__.to_vec()); | |
M = int(0); | |
vals_i__ = context__.vals_i("M"); | |
pos__ = 0; | |
M = vals_i__[pos__++]; | |
check_greater_or_equal(function__, "M", M, 0); | |
current_statement_begin__ = 211; | |
context__.validate_dims("data initialization", "K", "int", context__.to_vec()); | |
K = int(0); | |
vals_i__ = context__.vals_i("K"); | |
pos__ = 0; | |
K = vals_i__[pos__++]; | |
check_greater_or_equal(function__, "K", K, 0); | |
check_less_or_equal(function__, "K", K, (N * M)); | |
current_statement_begin__ = 212; | |
validate_non_negative_index("d_int_1d_ar", "N", N); | |
context__.validate_dims("data initialization", "d_int_1d_ar", "int", context__.to_vec(N)); | |
d_int_1d_ar = std::vector<int>(N, int(0)); | |
vals_i__ = context__.vals_i("d_int_1d_ar"); | |
pos__ = 0; | |
size_t d_int_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < d_int_1d_ar_k_0_max__; ++k_0__) { | |
d_int_1d_ar[k_0__] = vals_i__[pos__++]; | |
} | |
size_t d_int_1d_ar_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < d_int_1d_ar_i_0_max__; ++i_0__) { | |
check_less_or_equal(function__, "d_int_1d_ar[i_0__]", d_int_1d_ar[i_0__], N); | |
} | |
current_statement_begin__ = 213; | |
validate_non_negative_index("d_int_3d_ar", "N", N); | |
validate_non_negative_index("d_int_3d_ar", "M", M); | |
validate_non_negative_index("d_int_3d_ar", "K", K); | |
context__.validate_dims("data initialization", "d_int_3d_ar", "int", context__.to_vec(N,M,K)); | |
d_int_3d_ar = std::vector<std::vector<std::vector<int> > >(N, std::vector<std::vector<int> >(M, std::vector<int>(K, int(0)))); | |
vals_i__ = context__.vals_i("d_int_3d_ar"); | |
pos__ = 0; | |
size_t d_int_3d_ar_k_0_max__ = N; | |
size_t d_int_3d_ar_k_1_max__ = M; | |
size_t d_int_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < d_int_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < d_int_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_int_3d_ar_k_0_max__; ++k_0__) { | |
d_int_3d_ar[k_0__][k_1__][k_2__] = vals_i__[pos__++]; | |
} | |
} | |
} | |
size_t d_int_3d_ar_i_0_max__ = N; | |
size_t d_int_3d_ar_i_1_max__ = M; | |
size_t d_int_3d_ar_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < d_int_3d_ar_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < d_int_3d_ar_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < d_int_3d_ar_i_2_max__; ++i_2__) { | |
check_less_or_equal(function__, "d_int_3d_ar[i_0__][i_1__][i_2__]", d_int_3d_ar[i_0__][i_1__][i_2__], N); | |
} | |
} | |
} | |
current_statement_begin__ = 214; | |
context__.validate_dims("data initialization", "J", "double", context__.to_vec()); | |
J = double(0); | |
vals_r__ = context__.vals_r("J"); | |
pos__ = 0; | |
J = vals_r__[pos__++]; | |
check_greater_or_equal(function__, "J", J, -(2.0)); | |
check_less_or_equal(function__, "J", J, 2.0); | |
current_statement_begin__ = 215; | |
validate_non_negative_index("d_real_1d_ar", "N", N); | |
context__.validate_dims("data initialization", "d_real_1d_ar", "double", context__.to_vec(N)); | |
d_real_1d_ar = std::vector<double>(N, double(0)); | |
vals_r__ = context__.vals_r("d_real_1d_ar"); | |
pos__ = 0; | |
size_t d_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < d_real_1d_ar_k_0_max__; ++k_0__) { | |
d_real_1d_ar[k_0__] = vals_r__[pos__++]; | |
} | |
current_statement_begin__ = 216; | |
validate_non_negative_index("d_real_3d_ar", "N", N); | |
validate_non_negative_index("d_real_3d_ar", "M", M); | |
validate_non_negative_index("d_real_3d_ar", "K", K); | |
context__.validate_dims("data initialization", "d_real_3d_ar", "double", context__.to_vec(N,M,K)); | |
d_real_3d_ar = std::vector<std::vector<std::vector<double> > >(N, std::vector<std::vector<double> >(M, std::vector<double>(K, double(0)))); | |
vals_r__ = context__.vals_r("d_real_3d_ar"); | |
pos__ = 0; | |
size_t d_real_3d_ar_k_0_max__ = N; | |
size_t d_real_3d_ar_k_1_max__ = M; | |
size_t d_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < d_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < d_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_real_3d_ar_k_0_max__; ++k_0__) { | |
d_real_3d_ar[k_0__][k_1__][k_2__] = vals_r__[pos__++]; | |
} | |
} | |
} | |
current_statement_begin__ = 217; | |
validate_non_negative_index("d_vec", "N", N); | |
context__.validate_dims("data initialization", "d_vec", "vector_d", context__.to_vec(N)); | |
d_vec = Eigen::Matrix<double, Eigen::Dynamic, 1>(N); | |
vals_r__ = context__.vals_r("d_vec"); | |
pos__ = 0; | |
size_t d_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < d_vec_j_1_max__; ++j_1__) { | |
d_vec(j_1__) = vals_r__[pos__++]; | |
} | |
current_statement_begin__ = 218; | |
validate_non_negative_index("d_1d_vec", "N", N); | |
validate_non_negative_index("d_1d_vec", "N", N); | |
context__.validate_dims("data initialization", "d_1d_vec", "vector_d", context__.to_vec(N,N)); | |
d_1d_vec = std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(N, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)); | |
vals_r__ = context__.vals_r("d_1d_vec"); | |
pos__ = 0; | |
size_t d_1d_vec_j_1_max__ = N; | |
size_t d_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < d_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_1d_vec_k_0_max__; ++k_0__) { | |
d_1d_vec[k_0__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
current_statement_begin__ = 219; | |
validate_non_negative_index("d_3d_vec", "N", N); | |
validate_non_negative_index("d_3d_vec", "N", N); | |
validate_non_negative_index("d_3d_vec", "M", M); | |
validate_non_negative_index("d_3d_vec", "K", K); | |
context__.validate_dims("data initialization", "d_3d_vec", "vector_d", context__.to_vec(N,M,K,N)); | |
d_3d_vec = std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > >(N, std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(K, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)))); | |
vals_r__ = context__.vals_r("d_3d_vec"); | |
pos__ = 0; | |
size_t d_3d_vec_j_1_max__ = N; | |
size_t d_3d_vec_k_0_max__ = N; | |
size_t d_3d_vec_k_1_max__ = M; | |
size_t d_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < d_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < d_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < d_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_3d_vec_k_0_max__; ++k_0__) { | |
d_3d_vec[k_0__][k_1__][k_2__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 220; | |
validate_non_negative_index("d_row_vec", "N", N); | |
context__.validate_dims("data initialization", "d_row_vec", "row_vector_d", context__.to_vec(N)); | |
d_row_vec = Eigen::Matrix<double, 1, Eigen::Dynamic>(N); | |
vals_r__ = context__.vals_r("d_row_vec"); | |
pos__ = 0; | |
size_t d_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < d_row_vec_j_1_max__; ++j_1__) { | |
d_row_vec(j_1__) = vals_r__[pos__++]; | |
} | |
current_statement_begin__ = 221; | |
validate_non_negative_index("d_1d_row_vec", "N", N); | |
validate_non_negative_index("d_1d_row_vec", "N", N); | |
context__.validate_dims("data initialization", "d_1d_row_vec", "row_vector_d", context__.to_vec(N,N)); | |
d_1d_row_vec = std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> >(N, Eigen::Matrix<double, 1, Eigen::Dynamic>(N)); | |
vals_r__ = context__.vals_r("d_1d_row_vec"); | |
pos__ = 0; | |
size_t d_1d_row_vec_j_1_max__ = N; | |
size_t d_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < d_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_1d_row_vec_k_0_max__; ++k_0__) { | |
d_1d_row_vec[k_0__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
current_statement_begin__ = 222; | |
validate_non_negative_index("d_3d_row_vec", "N", N); | |
validate_non_negative_index("d_3d_row_vec", "N", N); | |
validate_non_negative_index("d_3d_row_vec", "M", M); | |
validate_non_negative_index("d_3d_row_vec", "K", K); | |
context__.validate_dims("data initialization", "d_3d_row_vec", "row_vector_d", context__.to_vec(N,M,K,N)); | |
d_3d_row_vec = std::vector<std::vector<std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > > >(N, std::vector<std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > >(M, std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> >(K, Eigen::Matrix<double, 1, Eigen::Dynamic>(N)))); | |
vals_r__ = context__.vals_r("d_3d_row_vec"); | |
pos__ = 0; | |
size_t d_3d_row_vec_j_1_max__ = N; | |
size_t d_3d_row_vec_k_0_max__ = N; | |
size_t d_3d_row_vec_k_1_max__ = M; | |
size_t d_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < d_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < d_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < d_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_3d_row_vec_k_0_max__; ++k_0__) { | |
d_3d_row_vec[k_0__][k_1__][k_2__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 223; | |
validate_non_negative_index("d_ar_mat", "2", 2); | |
validate_non_negative_index("d_ar_mat", "3", 3); | |
validate_non_negative_index("d_ar_mat", "4", 4); | |
validate_non_negative_index("d_ar_mat", "5", 5); | |
context__.validate_dims("data initialization", "d_ar_mat", "matrix_d", context__.to_vec(4,5,2,3)); | |
d_ar_mat = std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > >(4, std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> >(5, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(2, 3))); | |
vals_r__ = context__.vals_r("d_ar_mat"); | |
pos__ = 0; | |
size_t d_ar_mat_j_2_max__ = 3; | |
size_t d_ar_mat_j_1_max__ = 2; | |
size_t d_ar_mat_k_0_max__ = 4; | |
size_t d_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < d_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < d_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < d_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_ar_mat_k_0_max__; ++k_0__) { | |
d_ar_mat[k_0__][k_1__](j_1__, j_2__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
} | |
size_t d_ar_mat_i_0_max__ = 4; | |
size_t d_ar_mat_i_1_max__ = 5; | |
for (size_t i_0__ = 0; i_0__ < d_ar_mat_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < d_ar_mat_i_1_max__; ++i_1__) { | |
check_greater_or_equal(function__, "d_ar_mat[i_0__][i_1__]", d_ar_mat[i_0__][i_1__], 0); | |
check_less_or_equal(function__, "d_ar_mat[i_0__][i_1__]", d_ar_mat[i_0__][i_1__], 1); | |
} | |
} | |
current_statement_begin__ = 224; | |
validate_non_negative_index("d_simplex", "N", N); | |
context__.validate_dims("data initialization", "d_simplex", "vector_d", context__.to_vec(N)); | |
d_simplex = Eigen::Matrix<double, Eigen::Dynamic, 1>(N); | |
vals_r__ = context__.vals_r("d_simplex"); | |
pos__ = 0; | |
size_t d_simplex_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < d_simplex_j_1_max__; ++j_1__) { | |
d_simplex(j_1__) = vals_r__[pos__++]; | |
} | |
stan::math::check_simplex(function__, "d_simplex", d_simplex); | |
current_statement_begin__ = 225; | |
validate_non_negative_index("d_1d_simplex", "N", N); | |
validate_non_negative_index("d_1d_simplex", "N", N); | |
context__.validate_dims("data initialization", "d_1d_simplex", "vector_d", context__.to_vec(N,N)); | |
d_1d_simplex = std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(N, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)); | |
vals_r__ = context__.vals_r("d_1d_simplex"); | |
pos__ = 0; | |
size_t d_1d_simplex_j_1_max__ = N; | |
size_t d_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < d_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_1d_simplex_k_0_max__; ++k_0__) { | |
d_1d_simplex[k_0__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
size_t d_1d_simplex_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < d_1d_simplex_i_0_max__; ++i_0__) { | |
stan::math::check_simplex(function__, "d_1d_simplex[i_0__]", d_1d_simplex[i_0__]); | |
} | |
current_statement_begin__ = 226; | |
validate_non_negative_index("d_3d_simplex", "N", N); | |
validate_non_negative_index("d_3d_simplex", "N", N); | |
validate_non_negative_index("d_3d_simplex", "M", M); | |
validate_non_negative_index("d_3d_simplex", "K", K); | |
context__.validate_dims("data initialization", "d_3d_simplex", "vector_d", context__.to_vec(N,M,K,N)); | |
d_3d_simplex = std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > >(N, std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(K, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)))); | |
vals_r__ = context__.vals_r("d_3d_simplex"); | |
pos__ = 0; | |
size_t d_3d_simplex_j_1_max__ = N; | |
size_t d_3d_simplex_k_0_max__ = N; | |
size_t d_3d_simplex_k_1_max__ = M; | |
size_t d_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < d_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < d_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < d_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_3d_simplex_k_0_max__; ++k_0__) { | |
d_3d_simplex[k_0__][k_1__][k_2__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
} | |
size_t d_3d_simplex_i_0_max__ = N; | |
size_t d_3d_simplex_i_1_max__ = M; | |
size_t d_3d_simplex_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < d_3d_simplex_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < d_3d_simplex_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < d_3d_simplex_i_2_max__; ++i_2__) { | |
stan::math::check_simplex(function__, "d_3d_simplex[i_0__][i_1__][i_2__]", d_3d_simplex[i_0__][i_1__][i_2__]); | |
} | |
} | |
} | |
current_statement_begin__ = 227; | |
validate_non_negative_index("d_cfcov_54", "5", 5); | |
validate_non_negative_index("d_cfcov_54", "4", 4); | |
context__.validate_dims("data initialization", "d_cfcov_54", "matrix_d", context__.to_vec(5,4)); | |
d_cfcov_54 = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(5, 4); | |
vals_r__ = context__.vals_r("d_cfcov_54"); | |
pos__ = 0; | |
size_t d_cfcov_54_j_2_max__ = 4; | |
size_t d_cfcov_54_j_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < d_cfcov_54_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < d_cfcov_54_j_1_max__; ++j_1__) { | |
d_cfcov_54(j_1__, j_2__) = vals_r__[pos__++]; | |
} | |
} | |
stan::math::check_cholesky_factor(function__, "d_cfcov_54", d_cfcov_54); | |
current_statement_begin__ = 228; | |
validate_non_negative_index("d_cfcov_33", "3", 3); | |
validate_non_negative_index("d_cfcov_33", "3", 3); | |
context__.validate_dims("data initialization", "d_cfcov_33", "matrix_d", context__.to_vec(3,3)); | |
d_cfcov_33 = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(3, 3); | |
vals_r__ = context__.vals_r("d_cfcov_33"); | |
pos__ = 0; | |
size_t d_cfcov_33_j_2_max__ = 3; | |
size_t d_cfcov_33_j_1_max__ = 3; | |
for (size_t j_2__ = 0; j_2__ < d_cfcov_33_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < d_cfcov_33_j_1_max__; ++j_1__) { | |
d_cfcov_33(j_1__, j_2__) = vals_r__[pos__++]; | |
} | |
} | |
stan::math::check_cholesky_factor(function__, "d_cfcov_33", d_cfcov_33); | |
current_statement_begin__ = 229; | |
validate_non_negative_index("d_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("d_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("d_cfcov_33_ar", "K", K); | |
context__.validate_dims("data initialization", "d_cfcov_33_ar", "matrix_d", context__.to_vec(K,3,3)); | |
d_cfcov_33_ar = std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> >(K, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(3, 3)); | |
vals_r__ = context__.vals_r("d_cfcov_33_ar"); | |
pos__ = 0; | |
size_t d_cfcov_33_ar_j_2_max__ = 3; | |
size_t d_cfcov_33_ar_j_1_max__ = 3; | |
size_t d_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_2__ = 0; j_2__ < d_cfcov_33_ar_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < d_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < d_cfcov_33_ar_k_0_max__; ++k_0__) { | |
d_cfcov_33_ar[k_0__](j_1__, j_2__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
size_t d_cfcov_33_ar_i_0_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < d_cfcov_33_ar_i_0_max__; ++i_0__) { | |
stan::math::check_cholesky_factor(function__, "d_cfcov_33_ar[i_0__]", d_cfcov_33_ar[i_0__]); | |
} | |
// initialize transformed data variables | |
current_statement_begin__ = 232; | |
td_a = int(0); | |
stan::math::fill(td_a, std::numeric_limits<int>::min()); | |
stan::math::assign(td_a,N); | |
current_statement_begin__ = 233; | |
td_b = double(0); | |
stan::math::fill(td_b, DUMMY_VAR__); | |
stan::math::assign(td_b,(N * J)); | |
current_statement_begin__ = 234; | |
td_c = double(0); | |
stan::math::fill(td_c, DUMMY_VAR__); | |
stan::math::assign(td_c,foo_bar1(td_b, pstream__)); | |
current_statement_begin__ = 235; | |
validate_non_negative_index("td_ar_mat", "2", 2); | |
validate_non_negative_index("td_ar_mat", "3", 3); | |
validate_non_negative_index("td_ar_mat", "4", 4); | |
validate_non_negative_index("td_ar_mat", "5", 5); | |
td_ar_mat = std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > >(4, std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> >(5, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(2, 3))); | |
stan::math::fill(td_ar_mat, DUMMY_VAR__); | |
current_statement_begin__ = 236; | |
validate_non_negative_index("td_simplex", "N", N); | |
td_simplex = Eigen::Matrix<double, Eigen::Dynamic, 1>(N); | |
stan::math::fill(td_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 237; | |
validate_non_negative_index("td_1d_simplex", "N", N); | |
validate_non_negative_index("td_1d_simplex", "N", N); | |
td_1d_simplex = std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(N, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)); | |
stan::math::fill(td_1d_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 238; | |
validate_non_negative_index("td_3d_simplex", "N", N); | |
validate_non_negative_index("td_3d_simplex", "N", N); | |
validate_non_negative_index("td_3d_simplex", "M", M); | |
validate_non_negative_index("td_3d_simplex", "K", K); | |
td_3d_simplex = std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > >(N, std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(K, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)))); | |
stan::math::fill(td_3d_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 239; | |
validate_non_negative_index("td_cfcov_54", "5", 5); | |
validate_non_negative_index("td_cfcov_54", "4", 4); | |
td_cfcov_54 = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(5, 4); | |
stan::math::fill(td_cfcov_54, DUMMY_VAR__); | |
current_statement_begin__ = 240; | |
validate_non_negative_index("td_cfcov_33", "3", 3); | |
validate_non_negative_index("td_cfcov_33", "3", 3); | |
td_cfcov_33 = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(3, 3); | |
stan::math::fill(td_cfcov_33, DUMMY_VAR__); | |
// execute transformed data statements | |
current_statement_begin__ = 241; | |
for (int i = 1; i <= 4; ++i) { | |
current_statement_begin__ = 242; | |
for (int j = 1; j <= 5; ++j) { | |
{ | |
current_statement_begin__ = 243; | |
validate_non_negative_index("l_mat", "2", 2); | |
validate_non_negative_index("l_mat", "3", 3); | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> l_mat(2, 3); | |
stan::math::initialize(l_mat, DUMMY_VAR__); | |
stan::math::fill(l_mat, DUMMY_VAR__); | |
stan::math::assign(l_mat,get_base1(get_base1(d_ar_mat,i,"d_ar_mat",1),j,"d_ar_mat",2)); | |
current_statement_begin__ = 244; | |
if (pstream__) { | |
stan_print(pstream__,"ar dim1: "); | |
stan_print(pstream__,i); | |
stan_print(pstream__," ar dim2: "); | |
stan_print(pstream__,j); | |
stan_print(pstream__," matrix: "); | |
stan_print(pstream__,l_mat); | |
*pstream__ << std::endl; | |
} | |
} | |
} | |
} | |
{ | |
current_statement_begin__ = 248; | |
local_scalar_t__ z(DUMMY_VAR__); | |
(void) z; // dummy to suppress unused var warning | |
stan::math::initialize(z, DUMMY_VAR__); | |
stan::math::fill(z, DUMMY_VAR__); | |
current_statement_begin__ = 249; | |
validate_non_negative_index("vs", "2", 2); | |
Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> vs(2); | |
stan::math::initialize(vs, DUMMY_VAR__); | |
stan::math::fill(vs, DUMMY_VAR__); | |
current_statement_begin__ = 250; | |
for (auto v__loopid = vs.data(); v__loopid < vs.data() + vs.size(); ++v__loopid) { | |
auto& v = *(v__loopid); | |
(void) v; // dummy to suppress unused var warning | |
current_statement_begin__ = 251; | |
stan::math::assign(z, 0); | |
} | |
} | |
// validate transformed data | |
current_statement_begin__ = 235; | |
size_t td_ar_mat_i_0_max__ = 4; | |
size_t td_ar_mat_i_1_max__ = 5; | |
for (size_t i_0__ = 0; i_0__ < td_ar_mat_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < td_ar_mat_i_1_max__; ++i_1__) { | |
check_greater_or_equal(function__, "td_ar_mat[i_0__][i_1__]", td_ar_mat[i_0__][i_1__], 0); | |
check_less_or_equal(function__, "td_ar_mat[i_0__][i_1__]", td_ar_mat[i_0__][i_1__], 1); | |
} | |
} | |
current_statement_begin__ = 236; | |
stan::math::check_simplex(function__, "td_simplex", td_simplex); | |
current_statement_begin__ = 237; | |
size_t td_1d_simplex_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < td_1d_simplex_i_0_max__; ++i_0__) { | |
stan::math::check_simplex(function__, "td_1d_simplex[i_0__]", td_1d_simplex[i_0__]); | |
} | |
current_statement_begin__ = 238; | |
size_t td_3d_simplex_i_0_max__ = N; | |
size_t td_3d_simplex_i_1_max__ = M; | |
size_t td_3d_simplex_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < td_3d_simplex_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < td_3d_simplex_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < td_3d_simplex_i_2_max__; ++i_2__) { | |
stan::math::check_simplex(function__, "td_3d_simplex[i_0__][i_1__][i_2__]", td_3d_simplex[i_0__][i_1__][i_2__]); | |
} | |
} | |
} | |
current_statement_begin__ = 239; | |
stan::math::check_cholesky_factor(function__, "td_cfcov_54", td_cfcov_54); | |
current_statement_begin__ = 240; | |
stan::math::check_cholesky_factor(function__, "td_cfcov_33", td_cfcov_33); | |
// validate, set parameter ranges | |
num_params_r__ = 0U; | |
param_ranges_i__.clear(); | |
current_statement_begin__ = 256; | |
num_params_r__ += 1; | |
current_statement_begin__ = 257; | |
validate_non_negative_index("p_real_1d_ar", "N", N); | |
num_params_r__ += (1 * N); | |
current_statement_begin__ = 258; | |
validate_non_negative_index("p_real_3d_ar", "N", N); | |
validate_non_negative_index("p_real_3d_ar", "M", M); | |
validate_non_negative_index("p_real_3d_ar", "K", K); | |
num_params_r__ += (((1 * N) * M) * K); | |
current_statement_begin__ = 259; | |
validate_non_negative_index("p_vec", "N", N); | |
num_params_r__ += N; | |
current_statement_begin__ = 260; | |
validate_non_negative_index("p_1d_vec", "N", N); | |
validate_non_negative_index("p_1d_vec", "N", N); | |
num_params_r__ += (N * N); | |
current_statement_begin__ = 261; | |
validate_non_negative_index("p_3d_vec", "N", N); | |
validate_non_negative_index("p_3d_vec", "N", N); | |
validate_non_negative_index("p_3d_vec", "M", M); | |
validate_non_negative_index("p_3d_vec", "K", K); | |
num_params_r__ += (((N * N) * M) * K); | |
current_statement_begin__ = 262; | |
validate_non_negative_index("p_row_vec", "N", N); | |
num_params_r__ += N; | |
current_statement_begin__ = 263; | |
validate_non_negative_index("p_1d_row_vec", "N", N); | |
validate_non_negative_index("p_1d_row_vec", "N", N); | |
num_params_r__ += (N * N); | |
current_statement_begin__ = 264; | |
validate_non_negative_index("p_3d_row_vec", "N", N); | |
validate_non_negative_index("p_3d_row_vec", "N", N); | |
validate_non_negative_index("p_3d_row_vec", "M", M); | |
validate_non_negative_index("p_3d_row_vec", "K", K); | |
num_params_r__ += (((N * N) * M) * K); | |
current_statement_begin__ = 265; | |
validate_non_negative_index("p_ar_mat", "2", 2); | |
validate_non_negative_index("p_ar_mat", "3", 3); | |
validate_non_negative_index("p_ar_mat", "4", 4); | |
validate_non_negative_index("p_ar_mat", "5", 5); | |
num_params_r__ += (((2 * 3) * 4) * 5); | |
current_statement_begin__ = 266; | |
validate_non_negative_index("p_simplex", "N", N); | |
num_params_r__ += (N - 1); | |
current_statement_begin__ = 267; | |
validate_non_negative_index("p_1d_simplex", "N", N); | |
validate_non_negative_index("p_1d_simplex", "N", N); | |
num_params_r__ += ((N - 1) * N); | |
current_statement_begin__ = 268; | |
validate_non_negative_index("p_3d_simplex", "N", N); | |
validate_non_negative_index("p_3d_simplex", "N", N); | |
validate_non_negative_index("p_3d_simplex", "M", M); | |
validate_non_negative_index("p_3d_simplex", "K", K); | |
num_params_r__ += ((((N - 1) * N) * M) * K); | |
current_statement_begin__ = 269; | |
validate_non_negative_index("p_cfcov_54", "5", 5); | |
validate_non_negative_index("p_cfcov_54", "4", 4); | |
num_params_r__ += (((4 * (4 + 1)) / 2) + ((5 - 4) * 4)); | |
current_statement_begin__ = 270; | |
validate_non_negative_index("p_cfcov_33", "3", 3); | |
validate_non_negative_index("p_cfcov_33", "3", 3); | |
num_params_r__ += (((3 * (3 + 1)) / 2) + ((3 - 3) * 3)); | |
current_statement_begin__ = 271; | |
validate_non_negative_index("p_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("p_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("p_cfcov_33_ar", "K", K); | |
num_params_r__ += ((((3 * (3 + 1)) / 2) + ((3 - 3) * 3)) * K); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
~gentest_mother1_model() { } | |
void transform_inits(const stan::io::var_context& context__, | |
std::vector<int>& params_i__, | |
std::vector<double>& params_r__, | |
std::ostream* pstream__) const { | |
typedef double local_scalar_t__; | |
stan::io::writer<double> writer__(params_r__, params_i__); | |
size_t pos__; | |
(void) pos__; // dummy call to supress warning | |
std::vector<double> vals_r__; | |
std::vector<int> vals_i__; | |
current_statement_begin__ = 256; | |
if (!(context__.contains_r("p_real"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_real missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_real"); | |
pos__ = 0U; | |
context__.validate_dims("parameter initialization", "p_real", "double", context__.to_vec()); | |
double p_real(0); | |
p_real = vals_r__[pos__++]; | |
try { | |
writer__.scalar_unconstrain(p_real); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_real: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
current_statement_begin__ = 257; | |
if (!(context__.contains_r("p_real_1d_ar"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_real_1d_ar missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_real_1d_ar"); | |
pos__ = 0U; | |
validate_non_negative_index("p_real_1d_ar", "N", N); | |
context__.validate_dims("parameter initialization", "p_real_1d_ar", "double", context__.to_vec(N)); | |
std::vector<double> p_real_1d_ar(N, double(0)); | |
size_t p_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < p_real_1d_ar_k_0_max__; ++k_0__) { | |
p_real_1d_ar[k_0__] = vals_r__[pos__++]; | |
} | |
size_t p_real_1d_ar_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < p_real_1d_ar_i_0_max__; ++i_0__) { | |
try { | |
writer__.scalar_unconstrain(p_real_1d_ar[i_0__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_real_1d_ar: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
current_statement_begin__ = 258; | |
if (!(context__.contains_r("p_real_3d_ar"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_real_3d_ar missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_real_3d_ar"); | |
pos__ = 0U; | |
validate_non_negative_index("p_real_3d_ar", "N", N); | |
validate_non_negative_index("p_real_3d_ar", "M", M); | |
validate_non_negative_index("p_real_3d_ar", "K", K); | |
context__.validate_dims("parameter initialization", "p_real_3d_ar", "double", context__.to_vec(N,M,K)); | |
std::vector<std::vector<std::vector<double> > > p_real_3d_ar(N, std::vector<std::vector<double> >(M, std::vector<double>(K, double(0)))); | |
size_t p_real_3d_ar_k_0_max__ = N; | |
size_t p_real_3d_ar_k_1_max__ = M; | |
size_t p_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < p_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_real_3d_ar_k_0_max__; ++k_0__) { | |
p_real_3d_ar[k_0__][k_1__][k_2__] = vals_r__[pos__++]; | |
} | |
} | |
} | |
size_t p_real_3d_ar_i_0_max__ = N; | |
size_t p_real_3d_ar_i_1_max__ = M; | |
size_t p_real_3d_ar_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < p_real_3d_ar_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < p_real_3d_ar_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < p_real_3d_ar_i_2_max__; ++i_2__) { | |
try { | |
writer__.scalar_unconstrain(p_real_3d_ar[i_0__][i_1__][i_2__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_real_3d_ar: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 259; | |
if (!(context__.contains_r("p_vec"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_vec missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_vec"); | |
pos__ = 0U; | |
validate_non_negative_index("p_vec", "N", N); | |
context__.validate_dims("parameter initialization", "p_vec", "vector_d", context__.to_vec(N)); | |
Eigen::Matrix<double, Eigen::Dynamic, 1> p_vec(N); | |
size_t p_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_vec_j_1_max__; ++j_1__) { | |
p_vec(j_1__) = vals_r__[pos__++]; | |
} | |
try { | |
writer__.vector_lb_unconstrain(0, p_vec); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_vec: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
current_statement_begin__ = 260; | |
if (!(context__.contains_r("p_1d_vec"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_1d_vec missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_1d_vec"); | |
pos__ = 0U; | |
validate_non_negative_index("p_1d_vec", "N", N); | |
validate_non_negative_index("p_1d_vec", "N", N); | |
context__.validate_dims("parameter initialization", "p_1d_vec", "vector_d", context__.to_vec(N,N)); | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > p_1d_vec(N, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)); | |
size_t p_1d_vec_j_1_max__ = N; | |
size_t p_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_vec_k_0_max__; ++k_0__) { | |
p_1d_vec[k_0__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
size_t p_1d_vec_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < p_1d_vec_i_0_max__; ++i_0__) { | |
try { | |
writer__.vector_unconstrain(p_1d_vec[i_0__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_1d_vec: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
current_statement_begin__ = 261; | |
if (!(context__.contains_r("p_3d_vec"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_3d_vec missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_3d_vec"); | |
pos__ = 0U; | |
validate_non_negative_index("p_3d_vec", "N", N); | |
validate_non_negative_index("p_3d_vec", "N", N); | |
validate_non_negative_index("p_3d_vec", "M", M); | |
validate_non_negative_index("p_3d_vec", "K", K); | |
context__.validate_dims("parameter initialization", "p_3d_vec", "vector_d", context__.to_vec(N,M,K,N)); | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > > p_3d_vec(N, std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(K, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)))); | |
size_t p_3d_vec_j_1_max__ = N; | |
size_t p_3d_vec_k_0_max__ = N; | |
size_t p_3d_vec_k_1_max__ = M; | |
size_t p_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_vec_k_0_max__; ++k_0__) { | |
p_3d_vec[k_0__][k_1__][k_2__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
} | |
size_t p_3d_vec_i_0_max__ = N; | |
size_t p_3d_vec_i_1_max__ = M; | |
size_t p_3d_vec_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < p_3d_vec_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < p_3d_vec_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < p_3d_vec_i_2_max__; ++i_2__) { | |
try { | |
writer__.vector_unconstrain(p_3d_vec[i_0__][i_1__][i_2__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_3d_vec: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 262; | |
if (!(context__.contains_r("p_row_vec"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_row_vec missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_row_vec"); | |
pos__ = 0U; | |
validate_non_negative_index("p_row_vec", "N", N); | |
context__.validate_dims("parameter initialization", "p_row_vec", "row_vector_d", context__.to_vec(N)); | |
Eigen::Matrix<double, 1, Eigen::Dynamic> p_row_vec(N); | |
size_t p_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_row_vec_j_1_max__; ++j_1__) { | |
p_row_vec(j_1__) = vals_r__[pos__++]; | |
} | |
try { | |
writer__.row_vector_unconstrain(p_row_vec); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_row_vec: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
current_statement_begin__ = 263; | |
if (!(context__.contains_r("p_1d_row_vec"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_1d_row_vec missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_1d_row_vec"); | |
pos__ = 0U; | |
validate_non_negative_index("p_1d_row_vec", "N", N); | |
validate_non_negative_index("p_1d_row_vec", "N", N); | |
context__.validate_dims("parameter initialization", "p_1d_row_vec", "row_vector_d", context__.to_vec(N,N)); | |
std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > p_1d_row_vec(N, Eigen::Matrix<double, 1, Eigen::Dynamic>(N)); | |
size_t p_1d_row_vec_j_1_max__ = N; | |
size_t p_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_row_vec_k_0_max__; ++k_0__) { | |
p_1d_row_vec[k_0__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
size_t p_1d_row_vec_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < p_1d_row_vec_i_0_max__; ++i_0__) { | |
try { | |
writer__.row_vector_unconstrain(p_1d_row_vec[i_0__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_1d_row_vec: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
current_statement_begin__ = 264; | |
if (!(context__.contains_r("p_3d_row_vec"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_3d_row_vec missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_3d_row_vec"); | |
pos__ = 0U; | |
validate_non_negative_index("p_3d_row_vec", "N", N); | |
validate_non_negative_index("p_3d_row_vec", "N", N); | |
validate_non_negative_index("p_3d_row_vec", "M", M); | |
validate_non_negative_index("p_3d_row_vec", "K", K); | |
context__.validate_dims("parameter initialization", "p_3d_row_vec", "row_vector_d", context__.to_vec(N,M,K,N)); | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > > > p_3d_row_vec(N, std::vector<std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > >(M, std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> >(K, Eigen::Matrix<double, 1, Eigen::Dynamic>(N)))); | |
size_t p_3d_row_vec_j_1_max__ = N; | |
size_t p_3d_row_vec_k_0_max__ = N; | |
size_t p_3d_row_vec_k_1_max__ = M; | |
size_t p_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_row_vec_k_0_max__; ++k_0__) { | |
p_3d_row_vec[k_0__][k_1__][k_2__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
} | |
size_t p_3d_row_vec_i_0_max__ = N; | |
size_t p_3d_row_vec_i_1_max__ = M; | |
size_t p_3d_row_vec_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < p_3d_row_vec_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < p_3d_row_vec_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < p_3d_row_vec_i_2_max__; ++i_2__) { | |
try { | |
writer__.row_vector_unconstrain(p_3d_row_vec[i_0__][i_1__][i_2__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_3d_row_vec: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 265; | |
if (!(context__.contains_r("p_ar_mat"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_ar_mat missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_ar_mat"); | |
pos__ = 0U; | |
validate_non_negative_index("p_ar_mat", "2", 2); | |
validate_non_negative_index("p_ar_mat", "3", 3); | |
validate_non_negative_index("p_ar_mat", "4", 4); | |
validate_non_negative_index("p_ar_mat", "5", 5); | |
context__.validate_dims("parameter initialization", "p_ar_mat", "matrix_d", context__.to_vec(4,5,2,3)); | |
std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > > p_ar_mat(4, std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> >(5, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(2, 3))); | |
size_t p_ar_mat_j_2_max__ = 3; | |
size_t p_ar_mat_j_1_max__ = 2; | |
size_t p_ar_mat_k_0_max__ = 4; | |
size_t p_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < p_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < p_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_ar_mat_k_0_max__; ++k_0__) { | |
p_ar_mat[k_0__][k_1__](j_1__, j_2__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
} | |
size_t p_ar_mat_i_0_max__ = 4; | |
size_t p_ar_mat_i_1_max__ = 5; | |
for (size_t i_0__ = 0; i_0__ < p_ar_mat_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < p_ar_mat_i_1_max__; ++i_1__) { | |
try { | |
writer__.matrix_lub_unconstrain(0, 1, p_ar_mat[i_0__][i_1__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_ar_mat: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
current_statement_begin__ = 266; | |
if (!(context__.contains_r("p_simplex"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_simplex missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_simplex"); | |
pos__ = 0U; | |
validate_non_negative_index("p_simplex", "N", N); | |
context__.validate_dims("parameter initialization", "p_simplex", "vector_d", context__.to_vec(N)); | |
Eigen::Matrix<double, Eigen::Dynamic, 1> p_simplex(N); | |
size_t p_simplex_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_simplex_j_1_max__; ++j_1__) { | |
p_simplex(j_1__) = vals_r__[pos__++]; | |
} | |
try { | |
writer__.simplex_unconstrain(p_simplex); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_simplex: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
current_statement_begin__ = 267; | |
if (!(context__.contains_r("p_1d_simplex"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_1d_simplex missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_1d_simplex"); | |
pos__ = 0U; | |
validate_non_negative_index("p_1d_simplex", "N", N); | |
validate_non_negative_index("p_1d_simplex", "N", N); | |
context__.validate_dims("parameter initialization", "p_1d_simplex", "vector_d", context__.to_vec(N,N)); | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > p_1d_simplex(N, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)); | |
size_t p_1d_simplex_j_1_max__ = N; | |
size_t p_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_simplex_k_0_max__; ++k_0__) { | |
p_1d_simplex[k_0__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
size_t p_1d_simplex_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < p_1d_simplex_i_0_max__; ++i_0__) { | |
try { | |
writer__.simplex_unconstrain(p_1d_simplex[i_0__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_1d_simplex: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
current_statement_begin__ = 268; | |
if (!(context__.contains_r("p_3d_simplex"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_3d_simplex missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_3d_simplex"); | |
pos__ = 0U; | |
validate_non_negative_index("p_3d_simplex", "N", N); | |
validate_non_negative_index("p_3d_simplex", "N", N); | |
validate_non_negative_index("p_3d_simplex", "M", M); | |
validate_non_negative_index("p_3d_simplex", "K", K); | |
context__.validate_dims("parameter initialization", "p_3d_simplex", "vector_d", context__.to_vec(N,M,K,N)); | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > > p_3d_simplex(N, std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(K, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)))); | |
size_t p_3d_simplex_j_1_max__ = N; | |
size_t p_3d_simplex_k_0_max__ = N; | |
size_t p_3d_simplex_k_1_max__ = M; | |
size_t p_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_simplex_k_0_max__; ++k_0__) { | |
p_3d_simplex[k_0__][k_1__][k_2__](j_1__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
} | |
size_t p_3d_simplex_i_0_max__ = N; | |
size_t p_3d_simplex_i_1_max__ = M; | |
size_t p_3d_simplex_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < p_3d_simplex_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < p_3d_simplex_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < p_3d_simplex_i_2_max__; ++i_2__) { | |
try { | |
writer__.simplex_unconstrain(p_3d_simplex[i_0__][i_1__][i_2__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_3d_simplex: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 269; | |
if (!(context__.contains_r("p_cfcov_54"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_cfcov_54 missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_cfcov_54"); | |
pos__ = 0U; | |
validate_non_negative_index("p_cfcov_54", "5", 5); | |
validate_non_negative_index("p_cfcov_54", "4", 4); | |
context__.validate_dims("parameter initialization", "p_cfcov_54", "matrix_d", context__.to_vec(5,4)); | |
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> p_cfcov_54(5, 4); | |
size_t p_cfcov_54_j_2_max__ = 4; | |
size_t p_cfcov_54_j_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < p_cfcov_54_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_54_j_1_max__; ++j_1__) { | |
p_cfcov_54(j_1__, j_2__) = vals_r__[pos__++]; | |
} | |
} | |
try { | |
writer__.cholesky_factor_cov_unconstrain(p_cfcov_54); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_cfcov_54: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
current_statement_begin__ = 270; | |
if (!(context__.contains_r("p_cfcov_33"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_cfcov_33 missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_cfcov_33"); | |
pos__ = 0U; | |
validate_non_negative_index("p_cfcov_33", "3", 3); | |
validate_non_negative_index("p_cfcov_33", "3", 3); | |
context__.validate_dims("parameter initialization", "p_cfcov_33", "matrix_d", context__.to_vec(3,3)); | |
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> p_cfcov_33(3, 3); | |
size_t p_cfcov_33_j_2_max__ = 3; | |
size_t p_cfcov_33_j_1_max__ = 3; | |
for (size_t j_2__ = 0; j_2__ < p_cfcov_33_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_33_j_1_max__; ++j_1__) { | |
p_cfcov_33(j_1__, j_2__) = vals_r__[pos__++]; | |
} | |
} | |
try { | |
writer__.cholesky_factor_cov_unconstrain(p_cfcov_33); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_cfcov_33: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
current_statement_begin__ = 271; | |
if (!(context__.contains_r("p_cfcov_33_ar"))) | |
stan::lang::rethrow_located(std::runtime_error(std::string("Variable p_cfcov_33_ar missing")), current_statement_begin__, prog_reader__()); | |
vals_r__ = context__.vals_r("p_cfcov_33_ar"); | |
pos__ = 0U; | |
validate_non_negative_index("p_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("p_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("p_cfcov_33_ar", "K", K); | |
context__.validate_dims("parameter initialization", "p_cfcov_33_ar", "matrix_d", context__.to_vec(K,3,3)); | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > p_cfcov_33_ar(K, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(3, 3)); | |
size_t p_cfcov_33_ar_j_2_max__ = 3; | |
size_t p_cfcov_33_ar_j_1_max__ = 3; | |
size_t p_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_2__ = 0; j_2__ < p_cfcov_33_ar_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_cfcov_33_ar_k_0_max__; ++k_0__) { | |
p_cfcov_33_ar[k_0__](j_1__, j_2__) = vals_r__[pos__++]; | |
} | |
} | |
} | |
size_t p_cfcov_33_ar_i_0_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < p_cfcov_33_ar_i_0_max__; ++i_0__) { | |
try { | |
writer__.cholesky_factor_cov_unconstrain(p_cfcov_33_ar[i_0__]); | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable p_cfcov_33_ar: ") + e.what()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
params_r__ = writer__.data_r(); | |
params_i__ = writer__.data_i(); | |
} | |
void transform_inits(const stan::io::var_context& context, | |
Eigen::Matrix<double, Eigen::Dynamic, 1>& params_r, | |
std::ostream* pstream__) const { | |
std::vector<double> params_r_vec; | |
std::vector<int> params_i_vec; | |
transform_inits(context, params_i_vec, params_r_vec, pstream__); | |
params_r.resize(params_r_vec.size()); | |
for (int i = 0; i < params_r.size(); ++i) | |
params_r(i) = params_r_vec[i]; | |
} | |
template <bool propto__, bool jacobian__, typename T__> | |
T__ log_prob(std::vector<T__>& params_r__, | |
std::vector<int>& params_i__, | |
std::ostream* pstream__ = 0) const { | |
typedef T__ local_scalar_t__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // dummy to suppress unused var warning | |
T__ lp__(0.0); | |
stan::math::accumulator<T__> lp_accum__; | |
try { | |
stan::io::reader<local_scalar_t__> in__(params_r__, params_i__); | |
// model parameters | |
current_statement_begin__ = 256; | |
local_scalar_t__ p_real; | |
(void) p_real; // dummy to suppress unused var warning | |
if (jacobian__) | |
p_real = in__.scalar_constrain(lp__); | |
else | |
p_real = in__.scalar_constrain(); | |
current_statement_begin__ = 257; | |
std::vector<local_scalar_t__> p_real_1d_ar; | |
size_t p_real_1d_ar_d_0_max__ = N; | |
p_real_1d_ar.reserve(p_real_1d_ar_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_real_1d_ar_d_0_max__; ++d_0__) { | |
if (jacobian__) | |
p_real_1d_ar.push_back(in__.scalar_constrain(lp__)); | |
else | |
p_real_1d_ar.push_back(in__.scalar_constrain()); | |
} | |
current_statement_begin__ = 258; | |
std::vector<std::vector<std::vector<local_scalar_t__> > > p_real_3d_ar; | |
size_t p_real_3d_ar_d_0_max__ = N; | |
size_t p_real_3d_ar_d_1_max__ = M; | |
size_t p_real_3d_ar_d_2_max__ = K; | |
p_real_3d_ar.resize(p_real_3d_ar_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_real_3d_ar_d_0_max__; ++d_0__) { | |
p_real_3d_ar[d_0__].resize(p_real_3d_ar_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_real_3d_ar_d_1_max__; ++d_1__) { | |
p_real_3d_ar[d_0__][d_1__].reserve(p_real_3d_ar_d_2_max__); | |
for (size_t d_2__ = 0; d_2__ < p_real_3d_ar_d_2_max__; ++d_2__) { | |
if (jacobian__) | |
p_real_3d_ar[d_0__][d_1__].push_back(in__.scalar_constrain(lp__)); | |
else | |
p_real_3d_ar[d_0__][d_1__].push_back(in__.scalar_constrain()); | |
} | |
} | |
} | |
current_statement_begin__ = 259; | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> p_vec; | |
(void) p_vec; // dummy to suppress unused var warning | |
if (jacobian__) | |
p_vec = in__.vector_lb_constrain(0, N, lp__); | |
else | |
p_vec = in__.vector_lb_constrain(0, N); | |
current_statement_begin__ = 260; | |
std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > p_1d_vec; | |
size_t p_1d_vec_d_0_max__ = N; | |
p_1d_vec.reserve(p_1d_vec_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_1d_vec_d_0_max__; ++d_0__) { | |
if (jacobian__) | |
p_1d_vec.push_back(in__.vector_constrain(N, lp__)); | |
else | |
p_1d_vec.push_back(in__.vector_constrain(N)); | |
} | |
current_statement_begin__ = 261; | |
std::vector<std::vector<std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > > > p_3d_vec; | |
size_t p_3d_vec_d_0_max__ = N; | |
size_t p_3d_vec_d_1_max__ = M; | |
size_t p_3d_vec_d_2_max__ = K; | |
p_3d_vec.resize(p_3d_vec_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_3d_vec_d_0_max__; ++d_0__) { | |
p_3d_vec[d_0__].resize(p_3d_vec_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_3d_vec_d_1_max__; ++d_1__) { | |
p_3d_vec[d_0__][d_1__].reserve(p_3d_vec_d_2_max__); | |
for (size_t d_2__ = 0; d_2__ < p_3d_vec_d_2_max__; ++d_2__) { | |
if (jacobian__) | |
p_3d_vec[d_0__][d_1__].push_back(in__.vector_constrain(N, lp__)); | |
else | |
p_3d_vec[d_0__][d_1__].push_back(in__.vector_constrain(N)); | |
} | |
} | |
} | |
current_statement_begin__ = 262; | |
Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> p_row_vec; | |
(void) p_row_vec; // dummy to suppress unused var warning | |
if (jacobian__) | |
p_row_vec = in__.row_vector_constrain(N, lp__); | |
else | |
p_row_vec = in__.row_vector_constrain(N); | |
current_statement_begin__ = 263; | |
std::vector<Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> > p_1d_row_vec; | |
size_t p_1d_row_vec_d_0_max__ = N; | |
p_1d_row_vec.reserve(p_1d_row_vec_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_1d_row_vec_d_0_max__; ++d_0__) { | |
if (jacobian__) | |
p_1d_row_vec.push_back(in__.row_vector_constrain(N, lp__)); | |
else | |
p_1d_row_vec.push_back(in__.row_vector_constrain(N)); | |
} | |
current_statement_begin__ = 264; | |
std::vector<std::vector<std::vector<Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> > > > p_3d_row_vec; | |
size_t p_3d_row_vec_d_0_max__ = N; | |
size_t p_3d_row_vec_d_1_max__ = M; | |
size_t p_3d_row_vec_d_2_max__ = K; | |
p_3d_row_vec.resize(p_3d_row_vec_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_3d_row_vec_d_0_max__; ++d_0__) { | |
p_3d_row_vec[d_0__].resize(p_3d_row_vec_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_3d_row_vec_d_1_max__; ++d_1__) { | |
p_3d_row_vec[d_0__][d_1__].reserve(p_3d_row_vec_d_2_max__); | |
for (size_t d_2__ = 0; d_2__ < p_3d_row_vec_d_2_max__; ++d_2__) { | |
if (jacobian__) | |
p_3d_row_vec[d_0__][d_1__].push_back(in__.row_vector_constrain(N, lp__)); | |
else | |
p_3d_row_vec[d_0__][d_1__].push_back(in__.row_vector_constrain(N)); | |
} | |
} | |
} | |
current_statement_begin__ = 265; | |
std::vector<std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> > > p_ar_mat; | |
size_t p_ar_mat_d_0_max__ = 4; | |
size_t p_ar_mat_d_1_max__ = 5; | |
p_ar_mat.resize(p_ar_mat_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_ar_mat_d_0_max__; ++d_0__) { | |
p_ar_mat[d_0__].reserve(p_ar_mat_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_ar_mat_d_1_max__; ++d_1__) { | |
if (jacobian__) | |
p_ar_mat[d_0__].push_back(in__.matrix_lub_constrain(0, 1, 2, 3, lp__)); | |
else | |
p_ar_mat[d_0__].push_back(in__.matrix_lub_constrain(0, 1, 2, 3)); | |
} | |
} | |
current_statement_begin__ = 266; | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> p_simplex; | |
(void) p_simplex; // dummy to suppress unused var warning | |
if (jacobian__) | |
p_simplex = in__.simplex_constrain(N, lp__); | |
else | |
p_simplex = in__.simplex_constrain(N); | |
current_statement_begin__ = 267; | |
std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > p_1d_simplex; | |
size_t p_1d_simplex_d_0_max__ = N; | |
p_1d_simplex.reserve(p_1d_simplex_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_1d_simplex_d_0_max__; ++d_0__) { | |
if (jacobian__) | |
p_1d_simplex.push_back(in__.simplex_constrain(N, lp__)); | |
else | |
p_1d_simplex.push_back(in__.simplex_constrain(N)); | |
} | |
current_statement_begin__ = 268; | |
std::vector<std::vector<std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > > > p_3d_simplex; | |
size_t p_3d_simplex_d_0_max__ = N; | |
size_t p_3d_simplex_d_1_max__ = M; | |
size_t p_3d_simplex_d_2_max__ = K; | |
p_3d_simplex.resize(p_3d_simplex_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_3d_simplex_d_0_max__; ++d_0__) { | |
p_3d_simplex[d_0__].resize(p_3d_simplex_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_3d_simplex_d_1_max__; ++d_1__) { | |
p_3d_simplex[d_0__][d_1__].reserve(p_3d_simplex_d_2_max__); | |
for (size_t d_2__ = 0; d_2__ < p_3d_simplex_d_2_max__; ++d_2__) { | |
if (jacobian__) | |
p_3d_simplex[d_0__][d_1__].push_back(in__.simplex_constrain(N, lp__)); | |
else | |
p_3d_simplex[d_0__][d_1__].push_back(in__.simplex_constrain(N)); | |
} | |
} | |
} | |
current_statement_begin__ = 269; | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> p_cfcov_54; | |
(void) p_cfcov_54; // dummy to suppress unused var warning | |
if (jacobian__) | |
p_cfcov_54 = in__.cholesky_factor_cov_constrain(5, 4, lp__); | |
else | |
p_cfcov_54 = in__.cholesky_factor_cov_constrain(5, 4); | |
current_statement_begin__ = 270; | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> p_cfcov_33; | |
(void) p_cfcov_33; // dummy to suppress unused var warning | |
if (jacobian__) | |
p_cfcov_33 = in__.cholesky_factor_cov_constrain(3, 3, lp__); | |
else | |
p_cfcov_33 = in__.cholesky_factor_cov_constrain(3, 3); | |
current_statement_begin__ = 271; | |
std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> > p_cfcov_33_ar; | |
size_t p_cfcov_33_ar_d_0_max__ = K; | |
p_cfcov_33_ar.reserve(p_cfcov_33_ar_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_cfcov_33_ar_d_0_max__; ++d_0__) { | |
if (jacobian__) | |
p_cfcov_33_ar.push_back(in__.cholesky_factor_cov_constrain(3, 3, lp__)); | |
else | |
p_cfcov_33_ar.push_back(in__.cholesky_factor_cov_constrain(3, 3)); | |
} | |
// transformed parameters | |
current_statement_begin__ = 274; | |
validate_non_negative_index("tp_real_1d_ar", "N", N); | |
std::vector<local_scalar_t__> tp_real_1d_ar(N, local_scalar_t__(0)); | |
stan::math::initialize(tp_real_1d_ar, DUMMY_VAR__); | |
stan::math::fill(tp_real_1d_ar, DUMMY_VAR__); | |
current_statement_begin__ = 275; | |
validate_non_negative_index("tp_real_3d_ar", "N", N); | |
validate_non_negative_index("tp_real_3d_ar", "M", M); | |
validate_non_negative_index("tp_real_3d_ar", "K", K); | |
std::vector<std::vector<std::vector<local_scalar_t__> > > tp_real_3d_ar(N, std::vector<std::vector<local_scalar_t__> >(M, std::vector<local_scalar_t__>(K, local_scalar_t__(0)))); | |
stan::math::initialize(tp_real_3d_ar, DUMMY_VAR__); | |
stan::math::fill(tp_real_3d_ar, DUMMY_VAR__); | |
current_statement_begin__ = 276; | |
validate_non_negative_index("tp_vec", "N", N); | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> tp_vec(N); | |
stan::math::initialize(tp_vec, DUMMY_VAR__); | |
stan::math::fill(tp_vec, DUMMY_VAR__); | |
current_statement_begin__ = 277; | |
validate_non_negative_index("tp_1d_vec", "N", N); | |
validate_non_negative_index("tp_1d_vec", "N", N); | |
std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > tp_1d_vec(N, Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1>(N)); | |
stan::math::initialize(tp_1d_vec, DUMMY_VAR__); | |
stan::math::fill(tp_1d_vec, DUMMY_VAR__); | |
current_statement_begin__ = 278; | |
validate_non_negative_index("tp_3d_vec", "N", N); | |
validate_non_negative_index("tp_3d_vec", "N", N); | |
validate_non_negative_index("tp_3d_vec", "M", M); | |
validate_non_negative_index("tp_3d_vec", "K", K); | |
std::vector<std::vector<std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > > > tp_3d_vec(N, std::vector<std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> >(K, Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1>(N)))); | |
stan::math::initialize(tp_3d_vec, DUMMY_VAR__); | |
stan::math::fill(tp_3d_vec, DUMMY_VAR__); | |
current_statement_begin__ = 279; | |
validate_non_negative_index("tp_row_vec", "N", N); | |
Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> tp_row_vec(N); | |
stan::math::initialize(tp_row_vec, DUMMY_VAR__); | |
stan::math::fill(tp_row_vec, DUMMY_VAR__); | |
current_statement_begin__ = 280; | |
validate_non_negative_index("tp_1d_row_vec", "N", N); | |
validate_non_negative_index("tp_1d_row_vec", "N", N); | |
std::vector<Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> > tp_1d_row_vec(N, Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic>(N)); | |
stan::math::initialize(tp_1d_row_vec, DUMMY_VAR__); | |
stan::math::fill(tp_1d_row_vec, DUMMY_VAR__); | |
current_statement_begin__ = 281; | |
validate_non_negative_index("tp_3d_row_vec", "N", N); | |
validate_non_negative_index("tp_3d_row_vec", "N", N); | |
validate_non_negative_index("tp_3d_row_vec", "M", M); | |
validate_non_negative_index("tp_3d_row_vec", "K", K); | |
std::vector<std::vector<std::vector<Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> > > > tp_3d_row_vec(N, std::vector<std::vector<Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> > >(M, std::vector<Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic> >(K, Eigen::Matrix<local_scalar_t__, 1, Eigen::Dynamic>(N)))); | |
stan::math::initialize(tp_3d_row_vec, DUMMY_VAR__); | |
stan::math::fill(tp_3d_row_vec, DUMMY_VAR__); | |
current_statement_begin__ = 282; | |
validate_non_negative_index("tp_ar_mat", "2", 2); | |
validate_non_negative_index("tp_ar_mat", "3", 3); | |
validate_non_negative_index("tp_ar_mat", "4", 4); | |
validate_non_negative_index("tp_ar_mat", "5", 5); | |
std::vector<std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> > > tp_ar_mat(4, std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> >(5, Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic>(2, 3))); | |
stan::math::initialize(tp_ar_mat, DUMMY_VAR__); | |
stan::math::fill(tp_ar_mat, DUMMY_VAR__); | |
current_statement_begin__ = 283; | |
validate_non_negative_index("tp_simplex", "N", N); | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> tp_simplex(N); | |
stan::math::initialize(tp_simplex, DUMMY_VAR__); | |
stan::math::fill(tp_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 284; | |
validate_non_negative_index("tp_1d_simplex", "N", N); | |
validate_non_negative_index("tp_1d_simplex", "N", N); | |
std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > tp_1d_simplex(N, Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1>(N)); | |
stan::math::initialize(tp_1d_simplex, DUMMY_VAR__); | |
stan::math::fill(tp_1d_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 285; | |
validate_non_negative_index("tp_3d_simplex", "N", N); | |
validate_non_negative_index("tp_3d_simplex", "N", N); | |
validate_non_negative_index("tp_3d_simplex", "M", M); | |
validate_non_negative_index("tp_3d_simplex", "K", K); | |
std::vector<std::vector<std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > > > tp_3d_simplex(N, std::vector<std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> >(K, Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1>(N)))); | |
stan::math::initialize(tp_3d_simplex, DUMMY_VAR__); | |
stan::math::fill(tp_3d_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 286; | |
validate_non_negative_index("tp_cfcov_54", "5", 5); | |
validate_non_negative_index("tp_cfcov_54", "4", 4); | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> tp_cfcov_54(5, 4); | |
stan::math::initialize(tp_cfcov_54, DUMMY_VAR__); | |
stan::math::fill(tp_cfcov_54, DUMMY_VAR__); | |
current_statement_begin__ = 287; | |
validate_non_negative_index("tp_cfcov_33", "3", 3); | |
validate_non_negative_index("tp_cfcov_33", "3", 3); | |
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> tp_cfcov_33(3, 3); | |
stan::math::initialize(tp_cfcov_33, DUMMY_VAR__); | |
stan::math::fill(tp_cfcov_33, DUMMY_VAR__); | |
current_statement_begin__ = 288; | |
validate_non_negative_index("tp_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("tp_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("tp_cfcov_33_ar", "K", K); | |
std::vector<Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic> > tp_cfcov_33_ar(K, Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, Eigen::Dynamic>(3, 3)); | |
stan::math::initialize(tp_cfcov_33_ar, DUMMY_VAR__); | |
stan::math::fill(tp_cfcov_33_ar, DUMMY_VAR__); | |
// transformed parameters block statements | |
current_statement_begin__ = 290; | |
for (int i = 1; i <= N; ++i) { | |
current_statement_begin__ = 290; | |
stan::model::assign(tp_vec, | |
stan::model::cons_list(stan::model::index_uni(i), stan::model::nil_index_list()), | |
(-(1.0) * get_base1(p_vec,i,"p_vec",1)), | |
"assigning variable tp_vec"); | |
} | |
// validate transformed parameters | |
const char* function__ = "validate transformed params"; | |
(void) function__; // dummy to suppress unused var warning | |
current_statement_begin__ = 274; | |
size_t tp_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_real_1d_ar_k_0_max__; ++k_0__) { | |
if (stan::math::is_uninitialized(tp_real_1d_ar[k_0__])) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_real_1d_ar" << "[" << k_0__ << "]"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_real_1d_ar: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
size_t tp_real_1d_ar_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < tp_real_1d_ar_i_0_max__; ++i_0__) { | |
check_greater_or_equal(function__, "tp_real_1d_ar[i_0__]", tp_real_1d_ar[i_0__], 0); | |
} | |
current_statement_begin__ = 275; | |
size_t tp_real_3d_ar_k_0_max__ = N; | |
size_t tp_real_3d_ar_k_1_max__ = M; | |
size_t tp_real_3d_ar_k_2_max__ = K; | |
for (size_t k_0__ = 0; k_0__ < tp_real_3d_ar_k_0_max__; ++k_0__) { | |
for (size_t k_1__ = 0; k_1__ < tp_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_real_3d_ar_k_2_max__; ++k_2__) { | |
if (stan::math::is_uninitialized(tp_real_3d_ar[k_0__][k_1__][k_2__])) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_real_3d_ar" << "[" << k_0__ << "]" << "[" << k_1__ << "]" << "[" << k_2__ << "]"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_real_3d_ar: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
size_t tp_real_3d_ar_i_0_max__ = N; | |
size_t tp_real_3d_ar_i_1_max__ = M; | |
size_t tp_real_3d_ar_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < tp_real_3d_ar_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < tp_real_3d_ar_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < tp_real_3d_ar_i_2_max__; ++i_2__) { | |
check_greater_or_equal(function__, "tp_real_3d_ar[i_0__][i_1__][i_2__]", tp_real_3d_ar[i_0__][i_1__][i_2__], 0); | |
} | |
} | |
} | |
current_statement_begin__ = 276; | |
size_t tp_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_vec_j_1_max__; ++j_1__) { | |
if (stan::math::is_uninitialized(tp_vec(j_1__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_vec" << "(" << j_1__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_vec: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
check_less_or_equal(function__, "tp_vec", tp_vec, 1); | |
current_statement_begin__ = 277; | |
size_t tp_1d_vec_k_0_max__ = N; | |
size_t tp_1d_vec_j_1_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_1d_vec_k_0_max__; ++k_0__) { | |
for (size_t j_1__ = 0; j_1__ < tp_1d_vec_j_1_max__; ++j_1__) { | |
if (stan::math::is_uninitialized(tp_1d_vec[k_0__](j_1__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_1d_vec" << "[" << k_0__ << "]" << "(" << j_1__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_1d_vec: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
current_statement_begin__ = 278; | |
size_t tp_3d_vec_k_0_max__ = N; | |
size_t tp_3d_vec_k_1_max__ = M; | |
size_t tp_3d_vec_k_2_max__ = K; | |
size_t tp_3d_vec_j_1_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_3d_vec_k_0_max__; ++k_0__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_3d_vec_j_1_max__; ++j_1__) { | |
if (stan::math::is_uninitialized(tp_3d_vec[k_0__][k_1__][k_2__](j_1__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_3d_vec" << "[" << k_0__ << "]" << "[" << k_1__ << "]" << "[" << k_2__ << "]" << "(" << j_1__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_3d_vec: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 279; | |
size_t tp_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_row_vec_j_1_max__; ++j_1__) { | |
if (stan::math::is_uninitialized(tp_row_vec(j_1__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_row_vec" << "(" << j_1__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_row_vec: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
current_statement_begin__ = 280; | |
size_t tp_1d_row_vec_k_0_max__ = N; | |
size_t tp_1d_row_vec_j_1_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_1d_row_vec_k_0_max__; ++k_0__) { | |
for (size_t j_1__ = 0; j_1__ < tp_1d_row_vec_j_1_max__; ++j_1__) { | |
if (stan::math::is_uninitialized(tp_1d_row_vec[k_0__](j_1__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_1d_row_vec" << "[" << k_0__ << "]" << "(" << j_1__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_1d_row_vec: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
current_statement_begin__ = 281; | |
size_t tp_3d_row_vec_k_0_max__ = N; | |
size_t tp_3d_row_vec_k_1_max__ = M; | |
size_t tp_3d_row_vec_k_2_max__ = K; | |
size_t tp_3d_row_vec_j_1_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_3d_row_vec_k_0_max__; ++k_0__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_3d_row_vec_j_1_max__; ++j_1__) { | |
if (stan::math::is_uninitialized(tp_3d_row_vec[k_0__][k_1__][k_2__](j_1__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_3d_row_vec" << "[" << k_0__ << "]" << "[" << k_1__ << "]" << "[" << k_2__ << "]" << "(" << j_1__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_3d_row_vec: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 282; | |
size_t tp_ar_mat_k_0_max__ = 4; | |
size_t tp_ar_mat_k_1_max__ = 5; | |
size_t tp_ar_mat_j_1_max__ = 2; | |
size_t tp_ar_mat_j_2_max__ = 3; | |
for (size_t k_0__ = 0; k_0__ < tp_ar_mat_k_0_max__; ++k_0__) { | |
for (size_t k_1__ = 0; k_1__ < tp_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t j_1__ = 0; j_1__ < tp_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t j_2__ = 0; j_2__ < tp_ar_mat_j_2_max__; ++j_2__) { | |
if (stan::math::is_uninitialized(tp_ar_mat[k_0__][k_1__](j_1__, j_2__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_ar_mat" << "[" << k_0__ << "]" << "[" << k_1__ << "]" << "(" << j_1__ << ", " << j_2__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_ar_mat: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
} | |
size_t tp_ar_mat_i_0_max__ = 4; | |
size_t tp_ar_mat_i_1_max__ = 5; | |
for (size_t i_0__ = 0; i_0__ < tp_ar_mat_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < tp_ar_mat_i_1_max__; ++i_1__) { | |
check_greater_or_equal(function__, "tp_ar_mat[i_0__][i_1__]", tp_ar_mat[i_0__][i_1__], 0); | |
check_less_or_equal(function__, "tp_ar_mat[i_0__][i_1__]", tp_ar_mat[i_0__][i_1__], 1); | |
} | |
} | |
current_statement_begin__ = 283; | |
size_t tp_simplex_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_simplex_j_1_max__; ++j_1__) { | |
if (stan::math::is_uninitialized(tp_simplex(j_1__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_simplex" << "(" << j_1__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_simplex: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
stan::math::check_simplex(function__, "tp_simplex", tp_simplex); | |
current_statement_begin__ = 284; | |
size_t tp_1d_simplex_k_0_max__ = N; | |
size_t tp_1d_simplex_j_1_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_1d_simplex_k_0_max__; ++k_0__) { | |
for (size_t j_1__ = 0; j_1__ < tp_1d_simplex_j_1_max__; ++j_1__) { | |
if (stan::math::is_uninitialized(tp_1d_simplex[k_0__](j_1__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_1d_simplex" << "[" << k_0__ << "]" << "(" << j_1__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_1d_simplex: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
size_t tp_1d_simplex_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < tp_1d_simplex_i_0_max__; ++i_0__) { | |
stan::math::check_simplex(function__, "tp_1d_simplex[i_0__]", tp_1d_simplex[i_0__]); | |
} | |
current_statement_begin__ = 285; | |
size_t tp_3d_simplex_k_0_max__ = N; | |
size_t tp_3d_simplex_k_1_max__ = M; | |
size_t tp_3d_simplex_k_2_max__ = K; | |
size_t tp_3d_simplex_j_1_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_3d_simplex_k_0_max__; ++k_0__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_3d_simplex_j_1_max__; ++j_1__) { | |
if (stan::math::is_uninitialized(tp_3d_simplex[k_0__][k_1__][k_2__](j_1__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_3d_simplex" << "[" << k_0__ << "]" << "[" << k_1__ << "]" << "[" << k_2__ << "]" << "(" << j_1__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_3d_simplex: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
} | |
size_t tp_3d_simplex_i_0_max__ = N; | |
size_t tp_3d_simplex_i_1_max__ = M; | |
size_t tp_3d_simplex_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < tp_3d_simplex_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < tp_3d_simplex_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < tp_3d_simplex_i_2_max__; ++i_2__) { | |
stan::math::check_simplex(function__, "tp_3d_simplex[i_0__][i_1__][i_2__]", tp_3d_simplex[i_0__][i_1__][i_2__]); | |
} | |
} | |
} | |
current_statement_begin__ = 286; | |
size_t tp_cfcov_54_j_1_max__ = 5; | |
size_t tp_cfcov_54_j_2_max__ = 4; | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_54_j_1_max__; ++j_1__) { | |
for (size_t j_2__ = 0; j_2__ < tp_cfcov_54_j_2_max__; ++j_2__) { | |
if (stan::math::is_uninitialized(tp_cfcov_54(j_1__, j_2__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_cfcov_54" << "(" << j_1__ << ", " << j_2__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_cfcov_54: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
stan::math::check_cholesky_factor(function__, "tp_cfcov_54", tp_cfcov_54); | |
current_statement_begin__ = 287; | |
size_t tp_cfcov_33_j_1_max__ = 3; | |
size_t tp_cfcov_33_j_2_max__ = 3; | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_33_j_1_max__; ++j_1__) { | |
for (size_t j_2__ = 0; j_2__ < tp_cfcov_33_j_2_max__; ++j_2__) { | |
if (stan::math::is_uninitialized(tp_cfcov_33(j_1__, j_2__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_cfcov_33" << "(" << j_1__ << ", " << j_2__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_cfcov_33: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
stan::math::check_cholesky_factor(function__, "tp_cfcov_33", tp_cfcov_33); | |
current_statement_begin__ = 288; | |
size_t tp_cfcov_33_ar_k_0_max__ = K; | |
size_t tp_cfcov_33_ar_j_1_max__ = 3; | |
size_t tp_cfcov_33_ar_j_2_max__ = 3; | |
for (size_t k_0__ = 0; k_0__ < tp_cfcov_33_ar_k_0_max__; ++k_0__) { | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t j_2__ = 0; j_2__ < tp_cfcov_33_ar_j_2_max__; ++j_2__) { | |
if (stan::math::is_uninitialized(tp_cfcov_33_ar[k_0__](j_1__, j_2__))) { | |
std::stringstream msg__; | |
msg__ << "Undefined transformed parameter: tp_cfcov_33_ar" << "[" << k_0__ << "]" << "(" << j_1__ << ", " << j_2__ << ")"; | |
stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable tp_cfcov_33_ar: ") + msg__.str()), current_statement_begin__, prog_reader__()); | |
} | |
} | |
} | |
} | |
size_t tp_cfcov_33_ar_i_0_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < tp_cfcov_33_ar_i_0_max__; ++i_0__) { | |
stan::math::check_cholesky_factor(function__, "tp_cfcov_33_ar[i_0__]", tp_cfcov_33_ar[i_0__]); | |
} | |
// model body | |
{ | |
current_statement_begin__ = 293; | |
local_scalar_t__ r1(DUMMY_VAR__); | |
(void) r1; // dummy to suppress unused var warning | |
stan::math::initialize(r1, DUMMY_VAR__); | |
stan::math::fill(r1, DUMMY_VAR__); | |
stan::math::assign(r1,foo_bar1(p_real, pstream__)); | |
current_statement_begin__ = 294; | |
local_scalar_t__ r2(DUMMY_VAR__); | |
(void) r2; // dummy to suppress unused var warning | |
stan::math::initialize(r2, DUMMY_VAR__); | |
stan::math::fill(r2, DUMMY_VAR__); | |
stan::math::assign(r2,foo_bar1(J, pstream__)); | |
current_statement_begin__ = 295; | |
lp_accum__.add(normal_log<propto__>(p_real, 0, 1)); | |
} | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
lp_accum__.add(lp__); | |
return lp_accum__.sum(); | |
} // log_prob() | |
template <bool propto, bool jacobian, typename T_> | |
T_ log_prob(Eigen::Matrix<T_,Eigen::Dynamic,1>& params_r, | |
std::ostream* pstream = 0) const { | |
std::vector<T_> vec_params_r; | |
vec_params_r.reserve(params_r.size()); | |
for (int i = 0; i < params_r.size(); ++i) | |
vec_params_r.push_back(params_r(i)); | |
std::vector<int> vec_params_i; | |
return log_prob<propto,jacobian,T_>(vec_params_r, vec_params_i, pstream); | |
} | |
void get_param_names(std::vector<std::string>& names__) const { | |
names__.resize(0); | |
names__.push_back("p_real"); | |
names__.push_back("p_real_1d_ar"); | |
names__.push_back("p_real_3d_ar"); | |
names__.push_back("p_vec"); | |
names__.push_back("p_1d_vec"); | |
names__.push_back("p_3d_vec"); | |
names__.push_back("p_row_vec"); | |
names__.push_back("p_1d_row_vec"); | |
names__.push_back("p_3d_row_vec"); | |
names__.push_back("p_ar_mat"); | |
names__.push_back("p_simplex"); | |
names__.push_back("p_1d_simplex"); | |
names__.push_back("p_3d_simplex"); | |
names__.push_back("p_cfcov_54"); | |
names__.push_back("p_cfcov_33"); | |
names__.push_back("p_cfcov_33_ar"); | |
names__.push_back("tp_real_1d_ar"); | |
names__.push_back("tp_real_3d_ar"); | |
names__.push_back("tp_vec"); | |
names__.push_back("tp_1d_vec"); | |
names__.push_back("tp_3d_vec"); | |
names__.push_back("tp_row_vec"); | |
names__.push_back("tp_1d_row_vec"); | |
names__.push_back("tp_3d_row_vec"); | |
names__.push_back("tp_ar_mat"); | |
names__.push_back("tp_simplex"); | |
names__.push_back("tp_1d_simplex"); | |
names__.push_back("tp_3d_simplex"); | |
names__.push_back("tp_cfcov_54"); | |
names__.push_back("tp_cfcov_33"); | |
names__.push_back("tp_cfcov_33_ar"); | |
names__.push_back("gq_r1"); | |
names__.push_back("gq_r2"); | |
names__.push_back("gq_real_1d_ar"); | |
names__.push_back("gq_real_3d_ar"); | |
names__.push_back("gq_vec"); | |
names__.push_back("gq_1d_vec"); | |
names__.push_back("gq_3d_vec"); | |
names__.push_back("gq_row_vec"); | |
names__.push_back("gq_1d_row_vec"); | |
names__.push_back("gq_3d_row_vec"); | |
names__.push_back("gq_ar_mat"); | |
names__.push_back("gq_simplex"); | |
names__.push_back("gq_1d_simplex"); | |
names__.push_back("gq_3d_simplex"); | |
names__.push_back("gq_cfcov_54"); | |
names__.push_back("gq_cfcov_33"); | |
names__.push_back("gq_cfcov_33_ar"); | |
} | |
void get_dims(std::vector<std::vector<size_t> >& dimss__) const { | |
dimss__.resize(0); | |
std::vector<size_t> dims__; | |
dims__.resize(0); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(2); | |
dims__.push_back(3); | |
dims__.push_back(4); | |
dims__.push_back(5); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(5); | |
dims__.push_back(4); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(3); | |
dims__.push_back(3); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(3); | |
dims__.push_back(3); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(2); | |
dims__.push_back(3); | |
dims__.push_back(4); | |
dims__.push_back(5); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(5); | |
dims__.push_back(4); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(3); | |
dims__.push_back(3); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(3); | |
dims__.push_back(3); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(2); | |
dims__.push_back(3); | |
dims__.push_back(4); | |
dims__.push_back(5); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(N); | |
dims__.push_back(N); | |
dims__.push_back(M); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(5); | |
dims__.push_back(4); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(3); | |
dims__.push_back(3); | |
dimss__.push_back(dims__); | |
dims__.resize(0); | |
dims__.push_back(3); | |
dims__.push_back(3); | |
dims__.push_back(K); | |
dimss__.push_back(dims__); | |
} | |
template <typename RNG> | |
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 { | |
typedef double local_scalar_t__; | |
vars__.resize(0); | |
stan::io::reader<local_scalar_t__> in__(params_r__, params_i__); | |
static const char* function__ = "gentest_mother1_model_namespace::write_array"; | |
(void) function__; // dummy to suppress unused var warning | |
// read-transform, write parameters | |
double p_real = in__.scalar_constrain(); | |
vars__.push_back(p_real); | |
std::vector<double> p_real_1d_ar; | |
size_t p_real_1d_ar_d_0_max__ = N; | |
p_real_1d_ar.reserve(p_real_1d_ar_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_real_1d_ar_d_0_max__; ++d_0__) { | |
p_real_1d_ar.push_back(in__.scalar_constrain()); | |
} | |
size_t p_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < p_real_1d_ar_k_0_max__; ++k_0__) { | |
vars__.push_back(p_real_1d_ar[k_0__]); | |
} | |
std::vector<std::vector<std::vector<double> > > p_real_3d_ar; | |
size_t p_real_3d_ar_d_0_max__ = N; | |
size_t p_real_3d_ar_d_1_max__ = M; | |
size_t p_real_3d_ar_d_2_max__ = K; | |
p_real_3d_ar.resize(p_real_3d_ar_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_real_3d_ar_d_0_max__; ++d_0__) { | |
p_real_3d_ar[d_0__].resize(p_real_3d_ar_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_real_3d_ar_d_1_max__; ++d_1__) { | |
p_real_3d_ar[d_0__][d_1__].reserve(p_real_3d_ar_d_2_max__); | |
for (size_t d_2__ = 0; d_2__ < p_real_3d_ar_d_2_max__; ++d_2__) { | |
p_real_3d_ar[d_0__][d_1__].push_back(in__.scalar_constrain()); | |
} | |
} | |
} | |
size_t p_real_3d_ar_k_0_max__ = N; | |
size_t p_real_3d_ar_k_1_max__ = M; | |
size_t p_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < p_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_real_3d_ar_k_0_max__; ++k_0__) { | |
vars__.push_back(p_real_3d_ar[k_0__][k_1__][k_2__]); | |
} | |
} | |
} | |
Eigen::Matrix<double, Eigen::Dynamic, 1> p_vec = in__.vector_lb_constrain(0, N); | |
size_t p_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_vec_j_1_max__; ++j_1__) { | |
vars__.push_back(p_vec(j_1__)); | |
} | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > p_1d_vec; | |
size_t p_1d_vec_d_0_max__ = N; | |
p_1d_vec.reserve(p_1d_vec_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_1d_vec_d_0_max__; ++d_0__) { | |
p_1d_vec.push_back(in__.vector_constrain(N)); | |
} | |
size_t p_1d_vec_j_1_max__ = N; | |
size_t p_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(p_1d_vec[k_0__](j_1__)); | |
} | |
} | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > > p_3d_vec; | |
size_t p_3d_vec_d_0_max__ = N; | |
size_t p_3d_vec_d_1_max__ = M; | |
size_t p_3d_vec_d_2_max__ = K; | |
p_3d_vec.resize(p_3d_vec_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_3d_vec_d_0_max__; ++d_0__) { | |
p_3d_vec[d_0__].resize(p_3d_vec_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_3d_vec_d_1_max__; ++d_1__) { | |
p_3d_vec[d_0__][d_1__].reserve(p_3d_vec_d_2_max__); | |
for (size_t d_2__ = 0; d_2__ < p_3d_vec_d_2_max__; ++d_2__) { | |
p_3d_vec[d_0__][d_1__].push_back(in__.vector_constrain(N)); | |
} | |
} | |
} | |
size_t p_3d_vec_j_1_max__ = N; | |
size_t p_3d_vec_k_0_max__ = N; | |
size_t p_3d_vec_k_1_max__ = M; | |
size_t p_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(p_3d_vec[k_0__][k_1__][k_2__](j_1__)); | |
} | |
} | |
} | |
} | |
Eigen::Matrix<double, 1, Eigen::Dynamic> p_row_vec = in__.row_vector_constrain(N); | |
size_t p_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_row_vec_j_1_max__; ++j_1__) { | |
vars__.push_back(p_row_vec(j_1__)); | |
} | |
std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > p_1d_row_vec; | |
size_t p_1d_row_vec_d_0_max__ = N; | |
p_1d_row_vec.reserve(p_1d_row_vec_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_1d_row_vec_d_0_max__; ++d_0__) { | |
p_1d_row_vec.push_back(in__.row_vector_constrain(N)); | |
} | |
size_t p_1d_row_vec_j_1_max__ = N; | |
size_t p_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_row_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(p_1d_row_vec[k_0__](j_1__)); | |
} | |
} | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > > > p_3d_row_vec; | |
size_t p_3d_row_vec_d_0_max__ = N; | |
size_t p_3d_row_vec_d_1_max__ = M; | |
size_t p_3d_row_vec_d_2_max__ = K; | |
p_3d_row_vec.resize(p_3d_row_vec_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_3d_row_vec_d_0_max__; ++d_0__) { | |
p_3d_row_vec[d_0__].resize(p_3d_row_vec_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_3d_row_vec_d_1_max__; ++d_1__) { | |
p_3d_row_vec[d_0__][d_1__].reserve(p_3d_row_vec_d_2_max__); | |
for (size_t d_2__ = 0; d_2__ < p_3d_row_vec_d_2_max__; ++d_2__) { | |
p_3d_row_vec[d_0__][d_1__].push_back(in__.row_vector_constrain(N)); | |
} | |
} | |
} | |
size_t p_3d_row_vec_j_1_max__ = N; | |
size_t p_3d_row_vec_k_0_max__ = N; | |
size_t p_3d_row_vec_k_1_max__ = M; | |
size_t p_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_row_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(p_3d_row_vec[k_0__][k_1__][k_2__](j_1__)); | |
} | |
} | |
} | |
} | |
std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > > p_ar_mat; | |
size_t p_ar_mat_d_0_max__ = 4; | |
size_t p_ar_mat_d_1_max__ = 5; | |
p_ar_mat.resize(p_ar_mat_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_ar_mat_d_0_max__; ++d_0__) { | |
p_ar_mat[d_0__].reserve(p_ar_mat_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_ar_mat_d_1_max__; ++d_1__) { | |
p_ar_mat[d_0__].push_back(in__.matrix_lub_constrain(0, 1, 2, 3)); | |
} | |
} | |
size_t p_ar_mat_j_2_max__ = 3; | |
size_t p_ar_mat_j_1_max__ = 2; | |
size_t p_ar_mat_k_0_max__ = 4; | |
size_t p_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < p_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < p_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_ar_mat_k_0_max__; ++k_0__) { | |
vars__.push_back(p_ar_mat[k_0__][k_1__](j_1__, j_2__)); | |
} | |
} | |
} | |
} | |
Eigen::Matrix<double, Eigen::Dynamic, 1> p_simplex = in__.simplex_constrain(N); | |
size_t p_simplex_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_simplex_j_1_max__; ++j_1__) { | |
vars__.push_back(p_simplex(j_1__)); | |
} | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > p_1d_simplex; | |
size_t p_1d_simplex_d_0_max__ = N; | |
p_1d_simplex.reserve(p_1d_simplex_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_1d_simplex_d_0_max__; ++d_0__) { | |
p_1d_simplex.push_back(in__.simplex_constrain(N)); | |
} | |
size_t p_1d_simplex_j_1_max__ = N; | |
size_t p_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_simplex_k_0_max__; ++k_0__) { | |
vars__.push_back(p_1d_simplex[k_0__](j_1__)); | |
} | |
} | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > > p_3d_simplex; | |
size_t p_3d_simplex_d_0_max__ = N; | |
size_t p_3d_simplex_d_1_max__ = M; | |
size_t p_3d_simplex_d_2_max__ = K; | |
p_3d_simplex.resize(p_3d_simplex_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_3d_simplex_d_0_max__; ++d_0__) { | |
p_3d_simplex[d_0__].resize(p_3d_simplex_d_1_max__); | |
for (size_t d_1__ = 0; d_1__ < p_3d_simplex_d_1_max__; ++d_1__) { | |
p_3d_simplex[d_0__][d_1__].reserve(p_3d_simplex_d_2_max__); | |
for (size_t d_2__ = 0; d_2__ < p_3d_simplex_d_2_max__; ++d_2__) { | |
p_3d_simplex[d_0__][d_1__].push_back(in__.simplex_constrain(N)); | |
} | |
} | |
} | |
size_t p_3d_simplex_j_1_max__ = N; | |
size_t p_3d_simplex_k_0_max__ = N; | |
size_t p_3d_simplex_k_1_max__ = M; | |
size_t p_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_simplex_k_0_max__; ++k_0__) { | |
vars__.push_back(p_3d_simplex[k_0__][k_1__][k_2__](j_1__)); | |
} | |
} | |
} | |
} | |
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> p_cfcov_54 = in__.cholesky_factor_cov_constrain(5, 4); | |
size_t p_cfcov_54_j_2_max__ = 4; | |
size_t p_cfcov_54_j_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < p_cfcov_54_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_54_j_1_max__; ++j_1__) { | |
vars__.push_back(p_cfcov_54(j_1__, j_2__)); | |
} | |
} | |
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> p_cfcov_33 = in__.cholesky_factor_cov_constrain(3, 3); | |
size_t p_cfcov_33_j_2_max__ = 3; | |
size_t p_cfcov_33_j_1_max__ = 3; | |
for (size_t j_2__ = 0; j_2__ < p_cfcov_33_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_33_j_1_max__; ++j_1__) { | |
vars__.push_back(p_cfcov_33(j_1__, j_2__)); | |
} | |
} | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > p_cfcov_33_ar; | |
size_t p_cfcov_33_ar_d_0_max__ = K; | |
p_cfcov_33_ar.reserve(p_cfcov_33_ar_d_0_max__); | |
for (size_t d_0__ = 0; d_0__ < p_cfcov_33_ar_d_0_max__; ++d_0__) { | |
p_cfcov_33_ar.push_back(in__.cholesky_factor_cov_constrain(3, 3)); | |
} | |
size_t p_cfcov_33_ar_j_2_max__ = 3; | |
size_t p_cfcov_33_ar_j_1_max__ = 3; | |
size_t p_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_2__ = 0; j_2__ < p_cfcov_33_ar_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_cfcov_33_ar_k_0_max__; ++k_0__) { | |
vars__.push_back(p_cfcov_33_ar[k_0__](j_1__, j_2__)); | |
} | |
} | |
} | |
double lp__ = 0.0; | |
(void) lp__; // dummy to suppress unused var warning | |
stan::math::accumulator<double> lp_accum__; | |
local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); | |
(void) DUMMY_VAR__; // suppress unused var warning | |
if (!include_tparams__ && !include_gqs__) return; | |
try { | |
// declare and define transformed parameters | |
current_statement_begin__ = 274; | |
validate_non_negative_index("tp_real_1d_ar", "N", N); | |
std::vector<double> tp_real_1d_ar(N, double(0)); | |
stan::math::initialize(tp_real_1d_ar, DUMMY_VAR__); | |
stan::math::fill(tp_real_1d_ar, DUMMY_VAR__); | |
current_statement_begin__ = 275; | |
validate_non_negative_index("tp_real_3d_ar", "N", N); | |
validate_non_negative_index("tp_real_3d_ar", "M", M); | |
validate_non_negative_index("tp_real_3d_ar", "K", K); | |
std::vector<std::vector<std::vector<double> > > tp_real_3d_ar(N, std::vector<std::vector<double> >(M, std::vector<double>(K, double(0)))); | |
stan::math::initialize(tp_real_3d_ar, DUMMY_VAR__); | |
stan::math::fill(tp_real_3d_ar, DUMMY_VAR__); | |
current_statement_begin__ = 276; | |
validate_non_negative_index("tp_vec", "N", N); | |
Eigen::Matrix<double, Eigen::Dynamic, 1> tp_vec(N); | |
stan::math::initialize(tp_vec, DUMMY_VAR__); | |
stan::math::fill(tp_vec, DUMMY_VAR__); | |
current_statement_begin__ = 277; | |
validate_non_negative_index("tp_1d_vec", "N", N); | |
validate_non_negative_index("tp_1d_vec", "N", N); | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > tp_1d_vec(N, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)); | |
stan::math::initialize(tp_1d_vec, DUMMY_VAR__); | |
stan::math::fill(tp_1d_vec, DUMMY_VAR__); | |
current_statement_begin__ = 278; | |
validate_non_negative_index("tp_3d_vec", "N", N); | |
validate_non_negative_index("tp_3d_vec", "N", N); | |
validate_non_negative_index("tp_3d_vec", "M", M); | |
validate_non_negative_index("tp_3d_vec", "K", K); | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > > tp_3d_vec(N, std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(K, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)))); | |
stan::math::initialize(tp_3d_vec, DUMMY_VAR__); | |
stan::math::fill(tp_3d_vec, DUMMY_VAR__); | |
current_statement_begin__ = 279; | |
validate_non_negative_index("tp_row_vec", "N", N); | |
Eigen::Matrix<double, 1, Eigen::Dynamic> tp_row_vec(N); | |
stan::math::initialize(tp_row_vec, DUMMY_VAR__); | |
stan::math::fill(tp_row_vec, DUMMY_VAR__); | |
current_statement_begin__ = 280; | |
validate_non_negative_index("tp_1d_row_vec", "N", N); | |
validate_non_negative_index("tp_1d_row_vec", "N", N); | |
std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > tp_1d_row_vec(N, Eigen::Matrix<double, 1, Eigen::Dynamic>(N)); | |
stan::math::initialize(tp_1d_row_vec, DUMMY_VAR__); | |
stan::math::fill(tp_1d_row_vec, DUMMY_VAR__); | |
current_statement_begin__ = 281; | |
validate_non_negative_index("tp_3d_row_vec", "N", N); | |
validate_non_negative_index("tp_3d_row_vec", "N", N); | |
validate_non_negative_index("tp_3d_row_vec", "M", M); | |
validate_non_negative_index("tp_3d_row_vec", "K", K); | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > > > tp_3d_row_vec(N, std::vector<std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > >(M, std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> >(K, Eigen::Matrix<double, 1, Eigen::Dynamic>(N)))); | |
stan::math::initialize(tp_3d_row_vec, DUMMY_VAR__); | |
stan::math::fill(tp_3d_row_vec, DUMMY_VAR__); | |
current_statement_begin__ = 282; | |
validate_non_negative_index("tp_ar_mat", "2", 2); | |
validate_non_negative_index("tp_ar_mat", "3", 3); | |
validate_non_negative_index("tp_ar_mat", "4", 4); | |
validate_non_negative_index("tp_ar_mat", "5", 5); | |
std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > > tp_ar_mat(4, std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> >(5, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(2, 3))); | |
stan::math::initialize(tp_ar_mat, DUMMY_VAR__); | |
stan::math::fill(tp_ar_mat, DUMMY_VAR__); | |
current_statement_begin__ = 283; | |
validate_non_negative_index("tp_simplex", "N", N); | |
Eigen::Matrix<double, Eigen::Dynamic, 1> tp_simplex(N); | |
stan::math::initialize(tp_simplex, DUMMY_VAR__); | |
stan::math::fill(tp_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 284; | |
validate_non_negative_index("tp_1d_simplex", "N", N); | |
validate_non_negative_index("tp_1d_simplex", "N", N); | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > tp_1d_simplex(N, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)); | |
stan::math::initialize(tp_1d_simplex, DUMMY_VAR__); | |
stan::math::fill(tp_1d_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 285; | |
validate_non_negative_index("tp_3d_simplex", "N", N); | |
validate_non_negative_index("tp_3d_simplex", "N", N); | |
validate_non_negative_index("tp_3d_simplex", "M", M); | |
validate_non_negative_index("tp_3d_simplex", "K", K); | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > > tp_3d_simplex(N, std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(K, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)))); | |
stan::math::initialize(tp_3d_simplex, DUMMY_VAR__); | |
stan::math::fill(tp_3d_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 286; | |
validate_non_negative_index("tp_cfcov_54", "5", 5); | |
validate_non_negative_index("tp_cfcov_54", "4", 4); | |
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> tp_cfcov_54(5, 4); | |
stan::math::initialize(tp_cfcov_54, DUMMY_VAR__); | |
stan::math::fill(tp_cfcov_54, DUMMY_VAR__); | |
current_statement_begin__ = 287; | |
validate_non_negative_index("tp_cfcov_33", "3", 3); | |
validate_non_negative_index("tp_cfcov_33", "3", 3); | |
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> tp_cfcov_33(3, 3); | |
stan::math::initialize(tp_cfcov_33, DUMMY_VAR__); | |
stan::math::fill(tp_cfcov_33, DUMMY_VAR__); | |
current_statement_begin__ = 288; | |
validate_non_negative_index("tp_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("tp_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("tp_cfcov_33_ar", "K", K); | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > tp_cfcov_33_ar(K, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(3, 3)); | |
stan::math::initialize(tp_cfcov_33_ar, DUMMY_VAR__); | |
stan::math::fill(tp_cfcov_33_ar, DUMMY_VAR__); | |
// do transformed parameters statements | |
current_statement_begin__ = 290; | |
for (int i = 1; i <= N; ++i) { | |
current_statement_begin__ = 290; | |
stan::model::assign(tp_vec, | |
stan::model::cons_list(stan::model::index_uni(i), stan::model::nil_index_list()), | |
(-(1.0) * get_base1(p_vec,i,"p_vec",1)), | |
"assigning variable tp_vec"); | |
} | |
if (!include_gqs__ && !include_tparams__) return; | |
// validate transformed parameters | |
const char* function__ = "validate transformed params"; | |
(void) function__; // dummy to suppress unused var warning | |
current_statement_begin__ = 274; | |
size_t tp_real_1d_ar_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < tp_real_1d_ar_i_0_max__; ++i_0__) { | |
check_greater_or_equal(function__, "tp_real_1d_ar[i_0__]", tp_real_1d_ar[i_0__], 0); | |
} | |
current_statement_begin__ = 275; | |
size_t tp_real_3d_ar_i_0_max__ = N; | |
size_t tp_real_3d_ar_i_1_max__ = M; | |
size_t tp_real_3d_ar_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < tp_real_3d_ar_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < tp_real_3d_ar_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < tp_real_3d_ar_i_2_max__; ++i_2__) { | |
check_greater_or_equal(function__, "tp_real_3d_ar[i_0__][i_1__][i_2__]", tp_real_3d_ar[i_0__][i_1__][i_2__], 0); | |
} | |
} | |
} | |
current_statement_begin__ = 276; | |
check_less_or_equal(function__, "tp_vec", tp_vec, 1); | |
current_statement_begin__ = 282; | |
size_t tp_ar_mat_i_0_max__ = 4; | |
size_t tp_ar_mat_i_1_max__ = 5; | |
for (size_t i_0__ = 0; i_0__ < tp_ar_mat_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < tp_ar_mat_i_1_max__; ++i_1__) { | |
check_greater_or_equal(function__, "tp_ar_mat[i_0__][i_1__]", tp_ar_mat[i_0__][i_1__], 0); | |
check_less_or_equal(function__, "tp_ar_mat[i_0__][i_1__]", tp_ar_mat[i_0__][i_1__], 1); | |
} | |
} | |
current_statement_begin__ = 283; | |
stan::math::check_simplex(function__, "tp_simplex", tp_simplex); | |
current_statement_begin__ = 284; | |
size_t tp_1d_simplex_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < tp_1d_simplex_i_0_max__; ++i_0__) { | |
stan::math::check_simplex(function__, "tp_1d_simplex[i_0__]", tp_1d_simplex[i_0__]); | |
} | |
current_statement_begin__ = 285; | |
size_t tp_3d_simplex_i_0_max__ = N; | |
size_t tp_3d_simplex_i_1_max__ = M; | |
size_t tp_3d_simplex_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < tp_3d_simplex_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < tp_3d_simplex_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < tp_3d_simplex_i_2_max__; ++i_2__) { | |
stan::math::check_simplex(function__, "tp_3d_simplex[i_0__][i_1__][i_2__]", tp_3d_simplex[i_0__][i_1__][i_2__]); | |
} | |
} | |
} | |
current_statement_begin__ = 286; | |
stan::math::check_cholesky_factor(function__, "tp_cfcov_54", tp_cfcov_54); | |
current_statement_begin__ = 287; | |
stan::math::check_cholesky_factor(function__, "tp_cfcov_33", tp_cfcov_33); | |
current_statement_begin__ = 288; | |
size_t tp_cfcov_33_ar_i_0_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < tp_cfcov_33_ar_i_0_max__; ++i_0__) { | |
stan::math::check_cholesky_factor(function__, "tp_cfcov_33_ar[i_0__]", tp_cfcov_33_ar[i_0__]); | |
} | |
// write transformed parameters | |
if (include_tparams__) { | |
size_t tp_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_real_1d_ar_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_real_1d_ar[k_0__]); | |
} | |
size_t tp_real_3d_ar_k_0_max__ = N; | |
size_t tp_real_3d_ar_k_1_max__ = M; | |
size_t tp_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < tp_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_real_3d_ar_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_real_3d_ar[k_0__][k_1__][k_2__]); | |
} | |
} | |
} | |
size_t tp_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_vec_j_1_max__; ++j_1__) { | |
vars__.push_back(tp_vec(j_1__)); | |
} | |
size_t tp_1d_vec_j_1_max__ = N; | |
size_t tp_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_1d_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_1d_vec[k_0__](j_1__)); | |
} | |
} | |
size_t tp_3d_vec_j_1_max__ = N; | |
size_t tp_3d_vec_k_0_max__ = N; | |
size_t tp_3d_vec_k_1_max__ = M; | |
size_t tp_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_3d_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_3d_vec[k_0__][k_1__][k_2__](j_1__)); | |
} | |
} | |
} | |
} | |
size_t tp_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_row_vec_j_1_max__; ++j_1__) { | |
vars__.push_back(tp_row_vec(j_1__)); | |
} | |
size_t tp_1d_row_vec_j_1_max__ = N; | |
size_t tp_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_1d_row_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_1d_row_vec[k_0__](j_1__)); | |
} | |
} | |
size_t tp_3d_row_vec_j_1_max__ = N; | |
size_t tp_3d_row_vec_k_0_max__ = N; | |
size_t tp_3d_row_vec_k_1_max__ = M; | |
size_t tp_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_3d_row_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_3d_row_vec[k_0__][k_1__][k_2__](j_1__)); | |
} | |
} | |
} | |
} | |
size_t tp_ar_mat_j_2_max__ = 3; | |
size_t tp_ar_mat_j_1_max__ = 2; | |
size_t tp_ar_mat_k_0_max__ = 4; | |
size_t tp_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < tp_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < tp_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_ar_mat_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_ar_mat[k_0__][k_1__](j_1__, j_2__)); | |
} | |
} | |
} | |
} | |
size_t tp_simplex_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_simplex_j_1_max__; ++j_1__) { | |
vars__.push_back(tp_simplex(j_1__)); | |
} | |
size_t tp_1d_simplex_j_1_max__ = N; | |
size_t tp_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_1d_simplex_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_1d_simplex[k_0__](j_1__)); | |
} | |
} | |
size_t tp_3d_simplex_j_1_max__ = N; | |
size_t tp_3d_simplex_k_0_max__ = N; | |
size_t tp_3d_simplex_k_1_max__ = M; | |
size_t tp_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_3d_simplex_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_3d_simplex[k_0__][k_1__][k_2__](j_1__)); | |
} | |
} | |
} | |
} | |
size_t tp_cfcov_54_j_2_max__ = 4; | |
size_t tp_cfcov_54_j_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < tp_cfcov_54_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_54_j_1_max__; ++j_1__) { | |
vars__.push_back(tp_cfcov_54(j_1__, j_2__)); | |
} | |
} | |
size_t tp_cfcov_33_j_2_max__ = 3; | |
size_t tp_cfcov_33_j_1_max__ = 3; | |
for (size_t j_2__ = 0; j_2__ < tp_cfcov_33_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_33_j_1_max__; ++j_1__) { | |
vars__.push_back(tp_cfcov_33(j_1__, j_2__)); | |
} | |
} | |
size_t tp_cfcov_33_ar_j_2_max__ = 3; | |
size_t tp_cfcov_33_ar_j_1_max__ = 3; | |
size_t tp_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_2__ = 0; j_2__ < tp_cfcov_33_ar_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_cfcov_33_ar_k_0_max__; ++k_0__) { | |
vars__.push_back(tp_cfcov_33_ar[k_0__](j_1__, j_2__)); | |
} | |
} | |
} | |
} | |
if (!include_gqs__) return; | |
// declare and define generated quantities | |
current_statement_begin__ = 298; | |
double gq_r1; | |
(void) gq_r1; // dummy to suppress unused var warning | |
stan::math::initialize(gq_r1, DUMMY_VAR__); | |
stan::math::fill(gq_r1, DUMMY_VAR__); | |
stan::math::assign(gq_r1,foo_bar1(p_real, pstream__)); | |
current_statement_begin__ = 299; | |
double gq_r2; | |
(void) gq_r2; // dummy to suppress unused var warning | |
stan::math::initialize(gq_r2, DUMMY_VAR__); | |
stan::math::fill(gq_r2, DUMMY_VAR__); | |
stan::math::assign(gq_r2,foo_bar1(J, pstream__)); | |
current_statement_begin__ = 300; | |
validate_non_negative_index("gq_real_1d_ar", "N", N); | |
std::vector<double> gq_real_1d_ar(N, double(0)); | |
stan::math::initialize(gq_real_1d_ar, DUMMY_VAR__); | |
stan::math::fill(gq_real_1d_ar, DUMMY_VAR__); | |
current_statement_begin__ = 301; | |
validate_non_negative_index("gq_real_3d_ar", "N", N); | |
validate_non_negative_index("gq_real_3d_ar", "M", M); | |
validate_non_negative_index("gq_real_3d_ar", "K", K); | |
std::vector<std::vector<std::vector<double> > > gq_real_3d_ar(N, std::vector<std::vector<double> >(M, std::vector<double>(K, double(0)))); | |
stan::math::initialize(gq_real_3d_ar, DUMMY_VAR__); | |
stan::math::fill(gq_real_3d_ar, DUMMY_VAR__); | |
current_statement_begin__ = 302; | |
validate_non_negative_index("gq_vec", "N", N); | |
Eigen::Matrix<double, Eigen::Dynamic, 1> gq_vec(N); | |
stan::math::initialize(gq_vec, DUMMY_VAR__); | |
stan::math::fill(gq_vec, DUMMY_VAR__); | |
current_statement_begin__ = 303; | |
validate_non_negative_index("gq_1d_vec", "N", N); | |
validate_non_negative_index("gq_1d_vec", "N", N); | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > gq_1d_vec(N, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)); | |
stan::math::initialize(gq_1d_vec, DUMMY_VAR__); | |
stan::math::fill(gq_1d_vec, DUMMY_VAR__); | |
current_statement_begin__ = 304; | |
validate_non_negative_index("gq_3d_vec", "N", N); | |
validate_non_negative_index("gq_3d_vec", "N", N); | |
validate_non_negative_index("gq_3d_vec", "M", M); | |
validate_non_negative_index("gq_3d_vec", "K", K); | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > > gq_3d_vec(N, std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(K, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)))); | |
stan::math::initialize(gq_3d_vec, DUMMY_VAR__); | |
stan::math::fill(gq_3d_vec, DUMMY_VAR__); | |
current_statement_begin__ = 305; | |
validate_non_negative_index("gq_row_vec", "N", N); | |
Eigen::Matrix<double, 1, Eigen::Dynamic> gq_row_vec(N); | |
stan::math::initialize(gq_row_vec, DUMMY_VAR__); | |
stan::math::fill(gq_row_vec, DUMMY_VAR__); | |
current_statement_begin__ = 306; | |
validate_non_negative_index("gq_1d_row_vec", "N", N); | |
validate_non_negative_index("gq_1d_row_vec", "N", N); | |
std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > gq_1d_row_vec(N, Eigen::Matrix<double, 1, Eigen::Dynamic>(N)); | |
stan::math::initialize(gq_1d_row_vec, DUMMY_VAR__); | |
stan::math::fill(gq_1d_row_vec, DUMMY_VAR__); | |
current_statement_begin__ = 307; | |
validate_non_negative_index("gq_3d_row_vec", "N", N); | |
validate_non_negative_index("gq_3d_row_vec", "N", N); | |
validate_non_negative_index("gq_3d_row_vec", "M", M); | |
validate_non_negative_index("gq_3d_row_vec", "K", K); | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > > > gq_3d_row_vec(N, std::vector<std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> > >(M, std::vector<Eigen::Matrix<double, 1, Eigen::Dynamic> >(K, Eigen::Matrix<double, 1, Eigen::Dynamic>(N)))); | |
stan::math::initialize(gq_3d_row_vec, DUMMY_VAR__); | |
stan::math::fill(gq_3d_row_vec, DUMMY_VAR__); | |
current_statement_begin__ = 308; | |
validate_non_negative_index("gq_ar_mat", "2", 2); | |
validate_non_negative_index("gq_ar_mat", "3", 3); | |
validate_non_negative_index("gq_ar_mat", "4", 4); | |
validate_non_negative_index("gq_ar_mat", "5", 5); | |
std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > > gq_ar_mat(4, std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> >(5, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(2, 3))); | |
stan::math::initialize(gq_ar_mat, DUMMY_VAR__); | |
stan::math::fill(gq_ar_mat, DUMMY_VAR__); | |
current_statement_begin__ = 309; | |
validate_non_negative_index("gq_simplex", "N", N); | |
Eigen::Matrix<double, Eigen::Dynamic, 1> gq_simplex(N); | |
stan::math::initialize(gq_simplex, DUMMY_VAR__); | |
stan::math::fill(gq_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 310; | |
validate_non_negative_index("gq_1d_simplex", "N", N); | |
validate_non_negative_index("gq_1d_simplex", "N", N); | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > gq_1d_simplex(N, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)); | |
stan::math::initialize(gq_1d_simplex, DUMMY_VAR__); | |
stan::math::fill(gq_1d_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 311; | |
validate_non_negative_index("gq_3d_simplex", "N", N); | |
validate_non_negative_index("gq_3d_simplex", "N", N); | |
validate_non_negative_index("gq_3d_simplex", "M", M); | |
validate_non_negative_index("gq_3d_simplex", "K", K); | |
std::vector<std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > > > gq_3d_simplex(N, std::vector<std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> > >(M, std::vector<Eigen::Matrix<double, Eigen::Dynamic, 1> >(K, Eigen::Matrix<double, Eigen::Dynamic, 1>(N)))); | |
stan::math::initialize(gq_3d_simplex, DUMMY_VAR__); | |
stan::math::fill(gq_3d_simplex, DUMMY_VAR__); | |
current_statement_begin__ = 312; | |
validate_non_negative_index("gq_cfcov_54", "5", 5); | |
validate_non_negative_index("gq_cfcov_54", "4", 4); | |
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> gq_cfcov_54(5, 4); | |
stan::math::initialize(gq_cfcov_54, DUMMY_VAR__); | |
stan::math::fill(gq_cfcov_54, DUMMY_VAR__); | |
current_statement_begin__ = 313; | |
validate_non_negative_index("gq_cfcov_33", "3", 3); | |
validate_non_negative_index("gq_cfcov_33", "3", 3); | |
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> gq_cfcov_33(3, 3); | |
stan::math::initialize(gq_cfcov_33, DUMMY_VAR__); | |
stan::math::fill(gq_cfcov_33, DUMMY_VAR__); | |
current_statement_begin__ = 314; | |
validate_non_negative_index("gq_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("gq_cfcov_33_ar", "3", 3); | |
validate_non_negative_index("gq_cfcov_33_ar", "K", K); | |
std::vector<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> > gq_cfcov_33_ar(K, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(3, 3)); | |
stan::math::initialize(gq_cfcov_33_ar, DUMMY_VAR__); | |
stan::math::fill(gq_cfcov_33_ar, DUMMY_VAR__); | |
// generated quantities statements | |
current_statement_begin__ = 316; | |
for (int i = 1; i <= N; ++i) { | |
current_statement_begin__ = 316; | |
stan::model::assign(gq_vec, | |
stan::model::cons_list(stan::model::index_uni(i), stan::model::nil_index_list()), | |
(-(1.0) * get_base1(p_vec,i,"p_vec",1)), | |
"assigning variable gq_vec"); | |
} | |
// validate, write generated quantities | |
current_statement_begin__ = 298; | |
vars__.push_back(gq_r1); | |
current_statement_begin__ = 299; | |
vars__.push_back(gq_r2); | |
current_statement_begin__ = 300; | |
size_t gq_real_1d_ar_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < gq_real_1d_ar_i_0_max__; ++i_0__) { | |
check_greater_or_equal(function__, "gq_real_1d_ar[i_0__]", gq_real_1d_ar[i_0__], 0); | |
} | |
size_t gq_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < gq_real_1d_ar_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_real_1d_ar[k_0__]); | |
} | |
current_statement_begin__ = 301; | |
size_t gq_real_3d_ar_i_0_max__ = N; | |
size_t gq_real_3d_ar_i_1_max__ = M; | |
size_t gq_real_3d_ar_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < gq_real_3d_ar_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < gq_real_3d_ar_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < gq_real_3d_ar_i_2_max__; ++i_2__) { | |
check_greater_or_equal(function__, "gq_real_3d_ar[i_0__][i_1__][i_2__]", gq_real_3d_ar[i_0__][i_1__][i_2__], 0); | |
} | |
} | |
} | |
size_t gq_real_3d_ar_k_0_max__ = N; | |
size_t gq_real_3d_ar_k_1_max__ = M; | |
size_t gq_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < gq_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_real_3d_ar_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_real_3d_ar[k_0__][k_1__][k_2__]); | |
} | |
} | |
} | |
current_statement_begin__ = 302; | |
check_less_or_equal(function__, "gq_vec", gq_vec, 1); | |
size_t gq_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_vec_j_1_max__; ++j_1__) { | |
vars__.push_back(gq_vec(j_1__)); | |
} | |
current_statement_begin__ = 303; | |
size_t gq_1d_vec_j_1_max__ = N; | |
size_t gq_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_1d_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_1d_vec[k_0__](j_1__)); | |
} | |
} | |
current_statement_begin__ = 304; | |
size_t gq_3d_vec_j_1_max__ = N; | |
size_t gq_3d_vec_k_0_max__ = N; | |
size_t gq_3d_vec_k_1_max__ = M; | |
size_t gq_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < gq_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_3d_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_3d_vec[k_0__][k_1__][k_2__](j_1__)); | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 305; | |
size_t gq_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_row_vec_j_1_max__; ++j_1__) { | |
vars__.push_back(gq_row_vec(j_1__)); | |
} | |
current_statement_begin__ = 306; | |
size_t gq_1d_row_vec_j_1_max__ = N; | |
size_t gq_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_1d_row_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_1d_row_vec[k_0__](j_1__)); | |
} | |
} | |
current_statement_begin__ = 307; | |
size_t gq_3d_row_vec_j_1_max__ = N; | |
size_t gq_3d_row_vec_k_0_max__ = N; | |
size_t gq_3d_row_vec_k_1_max__ = M; | |
size_t gq_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < gq_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_3d_row_vec_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_3d_row_vec[k_0__][k_1__][k_2__](j_1__)); | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 308; | |
size_t gq_ar_mat_i_0_max__ = 4; | |
size_t gq_ar_mat_i_1_max__ = 5; | |
for (size_t i_0__ = 0; i_0__ < gq_ar_mat_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < gq_ar_mat_i_1_max__; ++i_1__) { | |
check_greater_or_equal(function__, "gq_ar_mat[i_0__][i_1__]", gq_ar_mat[i_0__][i_1__], 0); | |
check_less_or_equal(function__, "gq_ar_mat[i_0__][i_1__]", gq_ar_mat[i_0__][i_1__], 1); | |
} | |
} | |
size_t gq_ar_mat_j_2_max__ = 3; | |
size_t gq_ar_mat_j_1_max__ = 2; | |
size_t gq_ar_mat_k_0_max__ = 4; | |
size_t gq_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < gq_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < gq_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < gq_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_ar_mat_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_ar_mat[k_0__][k_1__](j_1__, j_2__)); | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 309; | |
stan::math::check_simplex(function__, "gq_simplex", gq_simplex); | |
size_t gq_simplex_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_simplex_j_1_max__; ++j_1__) { | |
vars__.push_back(gq_simplex(j_1__)); | |
} | |
current_statement_begin__ = 310; | |
size_t gq_1d_simplex_i_0_max__ = N; | |
for (size_t i_0__ = 0; i_0__ < gq_1d_simplex_i_0_max__; ++i_0__) { | |
stan::math::check_simplex(function__, "gq_1d_simplex[i_0__]", gq_1d_simplex[i_0__]); | |
} | |
size_t gq_1d_simplex_j_1_max__ = N; | |
size_t gq_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_1d_simplex_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_1d_simplex[k_0__](j_1__)); | |
} | |
} | |
current_statement_begin__ = 311; | |
size_t gq_3d_simplex_i_0_max__ = N; | |
size_t gq_3d_simplex_i_1_max__ = M; | |
size_t gq_3d_simplex_i_2_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < gq_3d_simplex_i_0_max__; ++i_0__) { | |
for (size_t i_1__ = 0; i_1__ < gq_3d_simplex_i_1_max__; ++i_1__) { | |
for (size_t i_2__ = 0; i_2__ < gq_3d_simplex_i_2_max__; ++i_2__) { | |
stan::math::check_simplex(function__, "gq_3d_simplex[i_0__][i_1__][i_2__]", gq_3d_simplex[i_0__][i_1__][i_2__]); | |
} | |
} | |
} | |
size_t gq_3d_simplex_j_1_max__ = N; | |
size_t gq_3d_simplex_k_0_max__ = N; | |
size_t gq_3d_simplex_k_1_max__ = M; | |
size_t gq_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < gq_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_3d_simplex_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_3d_simplex[k_0__][k_1__][k_2__](j_1__)); | |
} | |
} | |
} | |
} | |
current_statement_begin__ = 312; | |
stan::math::check_cholesky_factor(function__, "gq_cfcov_54", gq_cfcov_54); | |
size_t gq_cfcov_54_j_2_max__ = 4; | |
size_t gq_cfcov_54_j_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < gq_cfcov_54_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < gq_cfcov_54_j_1_max__; ++j_1__) { | |
vars__.push_back(gq_cfcov_54(j_1__, j_2__)); | |
} | |
} | |
current_statement_begin__ = 313; | |
stan::math::check_cholesky_factor(function__, "gq_cfcov_33", gq_cfcov_33); | |
size_t gq_cfcov_33_j_2_max__ = 3; | |
size_t gq_cfcov_33_j_1_max__ = 3; | |
for (size_t j_2__ = 0; j_2__ < gq_cfcov_33_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < gq_cfcov_33_j_1_max__; ++j_1__) { | |
vars__.push_back(gq_cfcov_33(j_1__, j_2__)); | |
} | |
} | |
current_statement_begin__ = 314; | |
size_t gq_cfcov_33_ar_i_0_max__ = K; | |
for (size_t i_0__ = 0; i_0__ < gq_cfcov_33_ar_i_0_max__; ++i_0__) { | |
stan::math::check_cholesky_factor(function__, "gq_cfcov_33_ar[i_0__]", gq_cfcov_33_ar[i_0__]); | |
} | |
size_t gq_cfcov_33_ar_j_2_max__ = 3; | |
size_t gq_cfcov_33_ar_j_1_max__ = 3; | |
size_t gq_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_2__ = 0; j_2__ < gq_cfcov_33_ar_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < gq_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_cfcov_33_ar_k_0_max__; ++k_0__) { | |
vars__.push_back(gq_cfcov_33_ar[k_0__](j_1__, j_2__)); | |
} | |
} | |
} | |
} catch (const std::exception& e) { | |
stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); | |
// Next line prevents compiler griping about no return | |
throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); | |
} | |
} | |
template <typename RNG> | |
void write_array(RNG& base_rng, | |
Eigen::Matrix<double,Eigen::Dynamic,1>& params_r, | |
Eigen::Matrix<double,Eigen::Dynamic,1>& vars, | |
bool include_tparams = true, | |
bool include_gqs = true, | |
std::ostream* pstream = 0) const { | |
std::vector<double> params_r_vec(params_r.size()); | |
for (int i = 0; i < params_r.size(); ++i) | |
params_r_vec[i] = params_r(i); | |
std::vector<double> vars_vec; | |
std::vector<int> params_i_vec; | |
write_array(base_rng, params_r_vec, params_i_vec, vars_vec, include_tparams, include_gqs, pstream); | |
vars.resize(vars_vec.size()); | |
for (int i = 0; i < vars.size(); ++i) | |
vars(i) = vars_vec[i]; | |
} | |
static std::string model_name() { | |
return "gentest_mother1_model"; | |
} | |
void constrained_param_names(std::vector<std::string>& param_names__, | |
bool include_tparams__ = true, | |
bool include_gqs__ = true) const { | |
std::stringstream param_name_stream__; | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_real"; | |
param_names__.push_back(param_name_stream__.str()); | |
size_t p_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < p_real_1d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_real_1d_ar" << '.' << k_0__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_real_3d_ar_k_0_max__ = N; | |
size_t p_real_3d_ar_k_1_max__ = M; | |
size_t p_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < p_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_real_3d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_real_3d_ar" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
size_t p_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_1d_vec_j_1_max__ = N; | |
size_t p_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_1d_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t p_3d_vec_j_1_max__ = N; | |
size_t p_3d_vec_k_0_max__ = N; | |
size_t p_3d_vec_k_1_max__ = M; | |
size_t p_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_3d_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t p_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_row_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_row_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_1d_row_vec_j_1_max__ = N; | |
size_t p_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_1d_row_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t p_3d_row_vec_j_1_max__ = N; | |
size_t p_3d_row_vec_k_0_max__ = N; | |
size_t p_3d_row_vec_k_1_max__ = M; | |
size_t p_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_3d_row_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t p_ar_mat_j_2_max__ = 3; | |
size_t p_ar_mat_j_1_max__ = 2; | |
size_t p_ar_mat_k_0_max__ = 4; | |
size_t p_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < p_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < p_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_ar_mat_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_ar_mat" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t p_simplex_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_simplex_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_simplex" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_1d_simplex_j_1_max__ = N; | |
size_t p_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_1d_simplex" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t p_3d_simplex_j_1_max__ = N; | |
size_t p_3d_simplex_k_0_max__ = N; | |
size_t p_3d_simplex_k_1_max__ = M; | |
size_t p_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_3d_simplex" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t p_cfcov_54_j_2_max__ = 4; | |
size_t p_cfcov_54_j_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < p_cfcov_54_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_54_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_cfcov_54" << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t p_cfcov_33_j_2_max__ = 3; | |
size_t p_cfcov_33_j_1_max__ = 3; | |
for (size_t j_2__ = 0; j_2__ < p_cfcov_33_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_33_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_cfcov_33" << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t p_cfcov_33_ar_j_2_max__ = 3; | |
size_t p_cfcov_33_ar_j_1_max__ = 3; | |
size_t p_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_2__ = 0; j_2__ < p_cfcov_33_ar_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_cfcov_33_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_cfcov_33_ar" << '.' << k_0__ + 1 << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
if (!include_gqs__ && !include_tparams__) return; | |
if (include_tparams__) { | |
size_t tp_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_real_1d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_real_1d_ar" << '.' << k_0__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_real_3d_ar_k_0_max__ = N; | |
size_t tp_real_3d_ar_k_1_max__ = M; | |
size_t tp_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < tp_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_real_3d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_real_3d_ar" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
size_t tp_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_1d_vec_j_1_max__ = N; | |
size_t tp_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_1d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_1d_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t tp_3d_vec_j_1_max__ = N; | |
size_t tp_3d_vec_k_0_max__ = N; | |
size_t tp_3d_vec_k_1_max__ = M; | |
size_t tp_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_3d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_3d_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t tp_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_row_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_row_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_1d_row_vec_j_1_max__ = N; | |
size_t tp_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_1d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_1d_row_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t tp_3d_row_vec_j_1_max__ = N; | |
size_t tp_3d_row_vec_k_0_max__ = N; | |
size_t tp_3d_row_vec_k_1_max__ = M; | |
size_t tp_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_3d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_3d_row_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t tp_ar_mat_j_2_max__ = 3; | |
size_t tp_ar_mat_j_1_max__ = 2; | |
size_t tp_ar_mat_k_0_max__ = 4; | |
size_t tp_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < tp_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < tp_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_ar_mat_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_ar_mat" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t tp_simplex_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_simplex_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_simplex" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_1d_simplex_j_1_max__ = N; | |
size_t tp_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_1d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_1d_simplex" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t tp_3d_simplex_j_1_max__ = N; | |
size_t tp_3d_simplex_k_0_max__ = N; | |
size_t tp_3d_simplex_k_1_max__ = M; | |
size_t tp_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_3d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_3d_simplex" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t tp_cfcov_54_j_2_max__ = 4; | |
size_t tp_cfcov_54_j_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < tp_cfcov_54_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_54_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_cfcov_54" << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t tp_cfcov_33_j_2_max__ = 3; | |
size_t tp_cfcov_33_j_1_max__ = 3; | |
for (size_t j_2__ = 0; j_2__ < tp_cfcov_33_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_33_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_cfcov_33" << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t tp_cfcov_33_ar_j_2_max__ = 3; | |
size_t tp_cfcov_33_ar_j_1_max__ = 3; | |
size_t tp_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_2__ = 0; j_2__ < tp_cfcov_33_ar_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_cfcov_33_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_cfcov_33_ar" << '.' << k_0__ + 1 << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
if (!include_gqs__) return; | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_r1"; | |
param_names__.push_back(param_name_stream__.str()); | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_r2"; | |
param_names__.push_back(param_name_stream__.str()); | |
size_t gq_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < gq_real_1d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_real_1d_ar" << '.' << k_0__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_real_3d_ar_k_0_max__ = N; | |
size_t gq_real_3d_ar_k_1_max__ = M; | |
size_t gq_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < gq_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_real_3d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_real_3d_ar" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
size_t gq_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_1d_vec_j_1_max__ = N; | |
size_t gq_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_1d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_1d_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t gq_3d_vec_j_1_max__ = N; | |
size_t gq_3d_vec_k_0_max__ = N; | |
size_t gq_3d_vec_k_1_max__ = M; | |
size_t gq_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < gq_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_3d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_3d_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t gq_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_row_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_row_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_1d_row_vec_j_1_max__ = N; | |
size_t gq_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_1d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_1d_row_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t gq_3d_row_vec_j_1_max__ = N; | |
size_t gq_3d_row_vec_k_0_max__ = N; | |
size_t gq_3d_row_vec_k_1_max__ = M; | |
size_t gq_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < gq_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_3d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_3d_row_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t gq_ar_mat_j_2_max__ = 3; | |
size_t gq_ar_mat_j_1_max__ = 2; | |
size_t gq_ar_mat_k_0_max__ = 4; | |
size_t gq_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < gq_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < gq_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < gq_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_ar_mat_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_ar_mat" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t gq_simplex_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_simplex_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_simplex" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_1d_simplex_j_1_max__ = N; | |
size_t gq_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_1d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_1d_simplex" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t gq_3d_simplex_j_1_max__ = N; | |
size_t gq_3d_simplex_k_0_max__ = N; | |
size_t gq_3d_simplex_k_1_max__ = M; | |
size_t gq_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < gq_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_3d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_3d_simplex" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t gq_cfcov_54_j_2_max__ = 4; | |
size_t gq_cfcov_54_j_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < gq_cfcov_54_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < gq_cfcov_54_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_cfcov_54" << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t gq_cfcov_33_j_2_max__ = 3; | |
size_t gq_cfcov_33_j_1_max__ = 3; | |
for (size_t j_2__ = 0; j_2__ < gq_cfcov_33_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < gq_cfcov_33_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_cfcov_33" << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t gq_cfcov_33_ar_j_2_max__ = 3; | |
size_t gq_cfcov_33_ar_j_1_max__ = 3; | |
size_t gq_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_2__ = 0; j_2__ < gq_cfcov_33_ar_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < gq_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_cfcov_33_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_cfcov_33_ar" << '.' << k_0__ + 1 << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
void unconstrained_param_names(std::vector<std::string>& param_names__, | |
bool include_tparams__ = true, | |
bool include_gqs__ = true) const { | |
std::stringstream param_name_stream__; | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_real"; | |
param_names__.push_back(param_name_stream__.str()); | |
size_t p_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < p_real_1d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_real_1d_ar" << '.' << k_0__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_real_3d_ar_k_0_max__ = N; | |
size_t p_real_3d_ar_k_1_max__ = M; | |
size_t p_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < p_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_real_3d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_real_3d_ar" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
size_t p_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_1d_vec_j_1_max__ = N; | |
size_t p_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_1d_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t p_3d_vec_j_1_max__ = N; | |
size_t p_3d_vec_k_0_max__ = N; | |
size_t p_3d_vec_k_1_max__ = M; | |
size_t p_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_3d_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t p_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_row_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_row_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_1d_row_vec_j_1_max__ = N; | |
size_t p_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_1d_row_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t p_3d_row_vec_j_1_max__ = N; | |
size_t p_3d_row_vec_k_0_max__ = N; | |
size_t p_3d_row_vec_k_1_max__ = M; | |
size_t p_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_3d_row_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t p_ar_mat_j_2_max__ = 3; | |
size_t p_ar_mat_j_1_max__ = 2; | |
size_t p_ar_mat_k_0_max__ = 4; | |
size_t p_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < p_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < p_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < p_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_ar_mat_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_ar_mat" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t p_simplex_j_1_max__ = (N - 1); | |
for (size_t j_1__ = 0; j_1__ < p_simplex_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_simplex" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_1d_simplex_j_1_max__ = (N - 1); | |
size_t p_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < p_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_1d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_1d_simplex" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t p_3d_simplex_j_1_max__ = (N - 1); | |
size_t p_3d_simplex_k_0_max__ = N; | |
size_t p_3d_simplex_k_1_max__ = M; | |
size_t p_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < p_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < p_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_3d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_3d_simplex" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t p_cfcov_54_j_1_max__ = (((4 * (4 + 1)) / 2) + ((5 - 4) * 4)); | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_54_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_cfcov_54" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_cfcov_33_j_1_max__ = (((3 * (3 + 1)) / 2) + ((3 - 3) * 3)); | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_33_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_cfcov_33" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t p_cfcov_33_ar_j_1_max__ = (((3 * (3 + 1)) / 2) + ((3 - 3) * 3)); | |
size_t p_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < p_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < p_cfcov_33_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "p_cfcov_33_ar" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
if (!include_gqs__ && !include_tparams__) return; | |
if (include_tparams__) { | |
size_t tp_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < tp_real_1d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_real_1d_ar" << '.' << k_0__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_real_3d_ar_k_0_max__ = N; | |
size_t tp_real_3d_ar_k_1_max__ = M; | |
size_t tp_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < tp_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_real_3d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_real_3d_ar" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
size_t tp_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_1d_vec_j_1_max__ = N; | |
size_t tp_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_1d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_1d_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t tp_3d_vec_j_1_max__ = N; | |
size_t tp_3d_vec_k_0_max__ = N; | |
size_t tp_3d_vec_k_1_max__ = M; | |
size_t tp_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_3d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_3d_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t tp_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_row_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_row_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_1d_row_vec_j_1_max__ = N; | |
size_t tp_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_1d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_1d_row_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t tp_3d_row_vec_j_1_max__ = N; | |
size_t tp_3d_row_vec_k_0_max__ = N; | |
size_t tp_3d_row_vec_k_1_max__ = M; | |
size_t tp_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_3d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_3d_row_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t tp_ar_mat_j_2_max__ = 3; | |
size_t tp_ar_mat_j_1_max__ = 2; | |
size_t tp_ar_mat_k_0_max__ = 4; | |
size_t tp_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < tp_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < tp_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < tp_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_ar_mat_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_ar_mat" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t tp_simplex_j_1_max__ = (N - 1); | |
for (size_t j_1__ = 0; j_1__ < tp_simplex_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_simplex" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_1d_simplex_j_1_max__ = (N - 1); | |
size_t tp_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < tp_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_1d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_1d_simplex" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t tp_3d_simplex_j_1_max__ = (N - 1); | |
size_t tp_3d_simplex_k_0_max__ = N; | |
size_t tp_3d_simplex_k_1_max__ = M; | |
size_t tp_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < tp_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < tp_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_3d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_3d_simplex" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t tp_cfcov_54_j_1_max__ = (((4 * (4 + 1)) / 2) + ((5 - 4) * 4)); | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_54_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_cfcov_54" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_cfcov_33_j_1_max__ = (((3 * (3 + 1)) / 2) + ((3 - 3) * 3)); | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_33_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_cfcov_33" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t tp_cfcov_33_ar_j_1_max__ = (((3 * (3 + 1)) / 2) + ((3 - 3) * 3)); | |
size_t tp_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < tp_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < tp_cfcov_33_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "tp_cfcov_33_ar" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
if (!include_gqs__) return; | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_r1"; | |
param_names__.push_back(param_name_stream__.str()); | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_r2"; | |
param_names__.push_back(param_name_stream__.str()); | |
size_t gq_real_1d_ar_k_0_max__ = N; | |
for (size_t k_0__ = 0; k_0__ < gq_real_1d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_real_1d_ar" << '.' << k_0__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_real_3d_ar_k_0_max__ = N; | |
size_t gq_real_3d_ar_k_1_max__ = M; | |
size_t gq_real_3d_ar_k_2_max__ = K; | |
for (size_t k_2__ = 0; k_2__ < gq_real_3d_ar_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_real_3d_ar_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_real_3d_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_real_3d_ar" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
size_t gq_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_1d_vec_j_1_max__ = N; | |
size_t gq_1d_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_1d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_1d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_1d_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t gq_3d_vec_j_1_max__ = N; | |
size_t gq_3d_vec_k_0_max__ = N; | |
size_t gq_3d_vec_k_1_max__ = M; | |
size_t gq_3d_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_3d_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < gq_3d_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_3d_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_3d_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_3d_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t gq_row_vec_j_1_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_row_vec_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_row_vec" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_1d_row_vec_j_1_max__ = N; | |
size_t gq_1d_row_vec_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_1d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_1d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_1d_row_vec" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t gq_3d_row_vec_j_1_max__ = N; | |
size_t gq_3d_row_vec_k_0_max__ = N; | |
size_t gq_3d_row_vec_k_1_max__ = M; | |
size_t gq_3d_row_vec_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_3d_row_vec_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < gq_3d_row_vec_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_3d_row_vec_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_3d_row_vec_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_3d_row_vec" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t gq_ar_mat_j_2_max__ = 3; | |
size_t gq_ar_mat_j_1_max__ = 2; | |
size_t gq_ar_mat_k_0_max__ = 4; | |
size_t gq_ar_mat_k_1_max__ = 5; | |
for (size_t j_2__ = 0; j_2__ < gq_ar_mat_j_2_max__; ++j_2__) { | |
for (size_t j_1__ = 0; j_1__ < gq_ar_mat_j_1_max__; ++j_1__) { | |
for (size_t k_1__ = 0; k_1__ < gq_ar_mat_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_ar_mat_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_ar_mat" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << j_1__ + 1 << '.' << j_2__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t gq_simplex_j_1_max__ = (N - 1); | |
for (size_t j_1__ = 0; j_1__ < gq_simplex_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_simplex" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_1d_simplex_j_1_max__ = (N - 1); | |
size_t gq_1d_simplex_k_0_max__ = N; | |
for (size_t j_1__ = 0; j_1__ < gq_1d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_1d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_1d_simplex" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
size_t gq_3d_simplex_j_1_max__ = (N - 1); | |
size_t gq_3d_simplex_k_0_max__ = N; | |
size_t gq_3d_simplex_k_1_max__ = M; | |
size_t gq_3d_simplex_k_2_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_3d_simplex_j_1_max__; ++j_1__) { | |
for (size_t k_2__ = 0; k_2__ < gq_3d_simplex_k_2_max__; ++k_2__) { | |
for (size_t k_1__ = 0; k_1__ < gq_3d_simplex_k_1_max__; ++k_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_3d_simplex_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_3d_simplex" << '.' << k_0__ + 1 << '.' << k_1__ + 1 << '.' << k_2__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
} | |
size_t gq_cfcov_54_j_1_max__ = (((4 * (4 + 1)) / 2) + ((5 - 4) * 4)); | |
for (size_t j_1__ = 0; j_1__ < gq_cfcov_54_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_cfcov_54" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_cfcov_33_j_1_max__ = (((3 * (3 + 1)) / 2) + ((3 - 3) * 3)); | |
for (size_t j_1__ = 0; j_1__ < gq_cfcov_33_j_1_max__; ++j_1__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_cfcov_33" << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
size_t gq_cfcov_33_ar_j_1_max__ = (((3 * (3 + 1)) / 2) + ((3 - 3) * 3)); | |
size_t gq_cfcov_33_ar_k_0_max__ = K; | |
for (size_t j_1__ = 0; j_1__ < gq_cfcov_33_ar_j_1_max__; ++j_1__) { | |
for (size_t k_0__ = 0; k_0__ < gq_cfcov_33_ar_k_0_max__; ++k_0__) { | |
param_name_stream__.str(std::string()); | |
param_name_stream__ << "gq_cfcov_33_ar" << '.' << k_0__ + 1 << '.' << j_1__ + 1; | |
param_names__.push_back(param_name_stream__.str()); | |
} | |
} | |
} | |
}; // model | |
} // namespace | |
typedef gentest_mother1_model_namespace::gentest_mother1_model stan_model; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment