From acccda0761b289157260865dfa1bb1ca6d008831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Argos=29?= <stepan@adjemian.eu> Date: Wed, 10 Apr 2024 15:00:08 +0200 Subject: [PATCH] Change type of M_.pac.{PACMODEL}.mce.b -> logical array. --- src/SubModel.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SubModel.cc b/src/SubModel.cc index 6f504424..bacd904a 100644 --- a/src/SubModel.cc +++ b/src/SubModel.cc @@ -1716,7 +1716,7 @@ PacModelTable::writeOutput(ostream& output) const string pac_model_name = "M_.pac." + name + ".mce."; output << pac_model_name << "z = NaN(" << get<2>(val).size() << ",1);" << endl << pac_model_name << "w = NaN(" << get<2>(val).size() << ",1);" << endl - << pac_model_name << "b = NaN(" << get<2>(val).size() << ",1);" << endl; + << pac_model_name << "b = true(" << get<2>(val).size() << ",1);" << endl; for (int component_idx {1}; auto& [component, growth_component, auxname, kind, coeff, growth_neutrality_param, h_indices, original_growth_component, growth_component_info] : get<2>(val)) @@ -1733,7 +1733,7 @@ PacModelTable::writeOutput(ostream& output) const { ostringstream mce_w; coeff->writeOutput(mce_w); - output << pac_model_name << "b(" << component_idx << ") = 0;" << endl + output << pac_model_name << "b(" << component_idx << ") = false;" << endl << pac_model_name << "w(" << component_idx << ") = " << mce_w.str() << ";" << endl; } @@ -1741,7 +1741,7 @@ PacModelTable::writeOutput(ostream& output) const the parameter index */ if ((params.size() == 1) && (typeid(*coeff) == typeid(VariableNode))) - output << pac_model_name << "b(" << component_idx << ") = 1;" << endl + output << pac_model_name << "b(" << component_idx << ") = true;" << endl << pac_model_name << "w(" << component_idx << ") = " << symbol_table.getTypeSpecificID(*params.begin()) + 1 << ";" << endl; -- GitLab