Verified Commit e2d5a835 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Global reindentation

parent 42106f85
Pipeline #2736 passed with stages
in 2 minutes and 24 seconds
......@@ -46,212 +46,212 @@ const double near_zero{1e-12};
*/
enum Tags
{
FLDZ, //!< Stores zero in the stack - 0 (0)
FLDC, //!< Stores a constant term in the stack - 1 (1)
FLDZ, //!< Stores zero in the stack - 0 (0)
FLDC, //!< Stores a constant term in the stack - 1 (1)
FDIMT, //!< Defines the number of temporary terms - dynamic context (the period has to be indicated) - 2 (2)
FDIMST, //!< Defines the number of temporary terms - static context (the period hasn't to be indicated) - 3 (3)
FLDT, //!< Stores a temporary term in the stack - dynamic context (the period has to be indicated) - 4 (4)
FLDST, //!< Stores a temporary term in the stack - static context (the period hasn't to be indicated) - 5 (5)
FSTPT, //!< Loads a temporary term from the stack - dynamic context (the period has to be indicated) - 6 (6)
FSTPST, //!< Loads a temporary term from the stack - static context (the period hasn't to be indicated) - 7 (7)
FDIMT, //!< Defines the number of temporary terms - dynamic context (the period has to be indicated) - 2 (2)
FDIMST, //!< Defines the number of temporary terms - static context (the period hasn't to be indicated) - 3 (3)
FLDT, //!< Stores a temporary term in the stack - dynamic context (the period has to be indicated) - 4 (4)
FLDST, //!< Stores a temporary term in the stack - static context (the period hasn't to be indicated) - 5 (5)
FSTPT, //!< Loads a temporary term from the stack - dynamic context (the period has to be indicated) - 6 (6)
FSTPST, //!< Loads a temporary term from the stack - static context (the period hasn't to be indicated) - 7 (7)
FLDU, //!< Stores an element of the vector U in the stack - dynamic context (the period has to be indicated) - 8 (8)
FLDSU, //!< Stores an element of the vector U in the stack - static context (the period hasn't to be indicated) - 9 (9)
FSTPU, //!< Loads an element of the vector U from the stack - dynamic context (the period has to be indicated) - A (10)
FSTPSU, //!< Loads an element of the vector U from the stack - static context (the period hasn't to be indicated) - B (11)
FLDU, //!< Stores an element of the vector U in the stack - dynamic context (the period has to be indicated) - 8 (8)
FLDSU, //!< Stores an element of the vector U in the stack - static context (the period hasn't to be indicated) - 9 (9)
FSTPU, //!< Loads an element of the vector U from the stack - dynamic context (the period has to be indicated) - A (10)
FSTPSU, //!< Loads an element of the vector U from the stack - static context (the period hasn't to be indicated) - B (11)
FLDV, //!< Stores a variable (described in SymbolType) in the stack - dynamic context (the period has to be indicated) - C (12)
FLDSV, //!< Stores a variable (described in SymbolType) in the stack - static context (the period hasn't to be indicated) - D (13)
FLDVS, //!< Stores a variable (described in SymbolType) in the stack - dynamic context but inside the STEADYSTATE function (the period hasn't to be indicated) - E (14)
FSTPV, //!< Loads a variable (described in SymbolType) from the stack - dynamic context (the period has to be indicated) - F (15)
FSTPSV, //!< Loads a variable (described in SymbolType) from the stack - static context (the period hasn't to be indicated) - 10 (16)
FLDV, //!< Stores a variable (described in SymbolType) in the stack - dynamic context (the period has to be indicated) - C (12)
FLDSV, //!< Stores a variable (described in SymbolType) in the stack - static context (the period hasn't to be indicated) - D (13)
FLDVS, //!< Stores a variable (described in SymbolType) in the stack - dynamic context but inside the STEADYSTATE function (the period hasn't to be indicated) - E (14)
FSTPV, //!< Loads a variable (described in SymbolType) from the stack - dynamic context (the period has to be indicated) - F (15)
FSTPSV, //!< Loads a variable (described in SymbolType) from the stack - static context (the period hasn't to be indicated) - 10 (16)
FLDR, //!< Stores a residual in the stack - 11 (17)
FSTPR, //!< Loads a residual from the stack - 12 (18)
FLDR, //!< Stores a residual in the stack - 11 (17)
FSTPR, //!< Loads a residual from the stack - 12 (18)
FSTPG, //!< Loads a derivative from the stack - 13 (19)
FSTPG2, //!< Loads a derivative matrix for static model from the stack - 14 (20)
FSTPG3, //!< Loads a derivative matrix for a dynamic model from the stack - 15 (21)
FSTPG4, //!< Loads a second order derivative matrix for a dynamic model from the stack - 16 (22)
FSTPG, //!< Loads a derivative from the stack - 13 (19)
FSTPG2, //!< Loads a derivative matrix for static model from the stack - 14 (20)
FSTPG3, //!< Loads a derivative matrix for a dynamic model from the stack - 15 (21)
FSTPG4, //!< Loads a second order derivative matrix for a dynamic model from the stack - 16 (22)
FUNARY, //!< A Unary operator - 17 (23)
FBINARY, //!< A binary operator - 18 (24)
FTRINARY, //!< A trinary operator - 19 (25)
FUNARY, //!< A Unary operator - 17 (23)
FBINARY, //!< A binary operator - 18 (24)
FTRINARY, //!< A trinary operator - 19 (25)
FCUML, //!< Cumulates the result - 1A (26)
FCUML, //!< Cumulates the result - 1A (26)
FJMPIFEVAL, //!< Jump if evaluate = true - 1B (27)
FJMP, //!< Jump - 1C (28)
FJMPIFEVAL, //!< Jump if evaluate = true - 1B (27)
FJMP, //!< Jump - 1C (28)
FBEGINBLOCK, //!< Defines the begining of a model block - 1D (29)
FENDBLOCK, //!< Defines the end of a model block - 1E (30)
FENDEQU, //!< Defines the last equation of the block. For block that has to be solved, the derivatives appear just after this flag - 1F (31)
FEND, //!< Defines the end of the model code - 20 (32)
FBEGINBLOCK, //!< Defines the begining of a model block - 1D (29)
FENDBLOCK, //!< Defines the end of a model block - 1E (30)
FENDEQU, //!< Defines the last equation of the block. For block that has to be solved, the derivatives appear just after this flag - 1F (31)
FEND, //!< Defines the end of the model code - 20 (32)
FOK, //!< Used for debugging purpose - 21 (33)
FOK, //!< Used for debugging purpose - 21 (33)
FNUMEXPR, //!< Store the expression type and references - 22 (34)
FNUMEXPR, //!< Store the expression type and references - 22 (34)
FCALL, //!< Call an external function - 23 (35)
FPUSH, //!< Push a double in the stack - 24 (36)
FPOP, //!< Pop a double from the stack - 25 (37)
FLDTEF, //!< Stores the result of an external function in the stack - 26 (38)
FSTPTEF, //!< Loads the result of an external function from the stack- 27 (39)
FLDTEFD, //!< Stores the result of an external function in the stack - 28 (40)
FSTPTEFD, //!< Loads the result of an external function from the stack- 29 (41)
FLDTEFDD, //!< Stores the result of an external function in the stack - 28 (42)
FSTPTEFDD //!< Loads the result of an external function from the stack- 29 (43)
FCALL, //!< Call an external function - 23 (35)
FPUSH, //!< Push a double in the stack - 24 (36)
FPOP, //!< Pop a double from the stack - 25 (37)
FLDTEF, //!< Stores the result of an external function in the stack - 26 (38)
FSTPTEF, //!< Loads the result of an external function from the stack- 27 (39)
FLDTEFD, //!< Stores the result of an external function in the stack - 28 (40)
FSTPTEFD, //!< Loads the result of an external function from the stack- 29 (41)
FLDTEFDD, //!< Stores the result of an external function in the stack - 28 (42)
FSTPTEFDD //!< Loads the result of an external function from the stack- 29 (43)
};
enum BlockType
{
SIMULTANS, //!< Simultaneous time separable block
PROLOGUE, //!< Prologue block (one equation at the beginning, later merged)
EPILOGUE, //!< Epilogue block (one equation at the beginning, later merged)
SIMULTAN //!< Simultaneous time unseparable block
SIMULTANS, //!< Simultaneous time separable block
PROLOGUE, //!< Prologue block (one equation at the beginning, later merged)
EPILOGUE, //!< Epilogue block (one equation at the beginning, later merged)
SIMULTAN //!< Simultaneous time unseparable block
};
enum EquationType
{
E_UNKNOWN, //!< Unknown equation type
E_EVALUATE, //!< Simple evaluation, normalized variable on left-hand side
E_EVALUATE_S, //!< Simple evaluation, normalize using the first order derivative
E_SOLVE //!< No simple evaluation of the equation, it has to be solved
E_UNKNOWN, //!< Unknown equation type
E_EVALUATE, //!< Simple evaluation, normalized variable on left-hand side
E_EVALUATE_S, //!< Simple evaluation, normalize using the first order derivative
E_SOLVE //!< No simple evaluation of the equation, it has to be solved
};
enum BlockSimulationType
{
UNKNOWN, //!< Unknown simulation type
EVALUATE_FORWARD, //!< Simple evaluation, normalized variable on left-hand side, forward
EVALUATE_BACKWARD, //!< Simple evaluation, normalized variable on left-hand side, backward
SOLVE_FORWARD_SIMPLE, //!< Block of one equation, newton solver needed, forward
SOLVE_BACKWARD_SIMPLE, //!< Block of one equation, newton solver needed, backward
SOLVE_TWO_BOUNDARIES_SIMPLE, //!< Block of one equation, newton solver needed, forward & ackward
SOLVE_FORWARD_COMPLETE, //!< Block of several equations, newton solver needed, forward
SOLVE_BACKWARD_COMPLETE, //!< Block of several equations, newton solver needed, backward
SOLVE_TWO_BOUNDARIES_COMPLETE //!< Block of several equations, newton solver needed, forward and backwar
UNKNOWN, //!< Unknown simulation type
EVALUATE_FORWARD, //!< Simple evaluation, normalized variable on left-hand side, forward
EVALUATE_BACKWARD, //!< Simple evaluation, normalized variable on left-hand side, backward
SOLVE_FORWARD_SIMPLE, //!< Block of one equation, newton solver needed, forward
SOLVE_BACKWARD_SIMPLE, //!< Block of one equation, newton solver needed, backward
SOLVE_TWO_BOUNDARIES_SIMPLE, //!< Block of one equation, newton solver needed, forward & ackward
SOLVE_FORWARD_COMPLETE, //!< Block of several equations, newton solver needed, forward
SOLVE_BACKWARD_COMPLETE, //!< Block of several equations, newton solver needed, backward
SOLVE_TWO_BOUNDARIES_COMPLETE //!< Block of several equations, newton solver needed, forward and backwar
};
//! Enumeration of possible symbol types
/*! Warning: do not to change existing values for 0 to 4: the values matter for homotopy_setup command */
enum class SymbolType
{
endogenous = 0, //!< Endogenous
exogenous = 1, //!< Exogenous
exogenousDet = 2, //!< Exogenous deterministic
parameter = 4, //!< Parameter
modelLocalVariable = 10, //!< Local variable whose scope is model (pound expression)
modFileLocalVariable = 11, //!< Local variable whose scope is mod file (model excluded)
externalFunction = 12, //!< External (user-defined) function
trend = 13, //!< Trend variable
statementDeclaredVariable = 14, //!< Local variable assigned within a Statement (see subsample statement for example)
logTrend = 15, //!< Log-trend variable
unusedEndogenous = 16, //!< Type to mark unused endogenous variables when `nostrict` option is passed
endogenousVAR = 17, //!< Variables declared in a var_model statement
epilogue = 18, //!< Variables created in epilogue block
excludedVariable = 19 //!< Type to use when an equation is excluded via include/exclude_eqs and the LHS variable is not used elsewhere in the model
endogenous = 0, //!< Endogenous
exogenous = 1, //!< Exogenous
exogenousDet = 2, //!< Exogenous deterministic
parameter = 4, //!< Parameter
modelLocalVariable = 10, //!< Local variable whose scope is model (pound expression)
modFileLocalVariable = 11, //!< Local variable whose scope is mod file (model excluded)
externalFunction = 12, //!< External (user-defined) function
trend = 13, //!< Trend variable
statementDeclaredVariable = 14, //!< Local variable assigned within a Statement (see subsample statement for example)
logTrend = 15, //!< Log-trend variable
unusedEndogenous = 16, //!< Type to mark unused endogenous variables when `nostrict` option is passed
endogenousVAR = 17, //!< Variables declared in a var_model statement
epilogue = 18, //!< Variables created in epilogue block
excludedVariable = 19 //!< Type to use when an equation is excluded via include/exclude_eqs and the LHS variable is not used elsewhere in the model
};
enum ExpressionType
{
TemporaryTerm,
ModelEquation,
FirstEndoDerivative,
FirstOtherEndoDerivative,
FirstExoDerivative,
FirstExodetDerivative,
FirstParamDerivative,
SecondEndoDerivative,
SecondExoDerivative,
SecondExodetDerivative,
SecondParamDerivative,
ThirdEndoDerivative,
ThirdExoDerivative,
ThirdExodetDerivative,
ThirdParamDerivative
TemporaryTerm,
ModelEquation,
FirstEndoDerivative,
FirstOtherEndoDerivative,
FirstExoDerivative,
FirstExodetDerivative,
FirstParamDerivative,
SecondEndoDerivative,
SecondExoDerivative,
SecondExodetDerivative,
SecondParamDerivative,
ThirdEndoDerivative,
ThirdExoDerivative,
ThirdExodetDerivative,
ThirdParamDerivative
};
enum class UnaryOpcode
{
uminus,
exp,
log,
log10,
cos,
sin,
tan,
acos,
asin,
atan,
cosh,
sinh,
tanh,
acosh,
asinh,
atanh,
sqrt,
cbrt,
abs,
sign,
steadyState,
steadyStateParamDeriv, // for the derivative of the STEADY_STATE operator w.r.t. to a parameter
steadyStateParam2ndDeriv, // for the 2nd derivative of the STEADY_STATE operator w.r.t. to a parameter
expectation,
erf,
diff,
adl
uminus,
exp,
log,
log10,
cos,
sin,
tan,
acos,
asin,
atan,
cosh,
sinh,
tanh,
acosh,
asinh,
atanh,
sqrt,
cbrt,
abs,
sign,
steadyState,
steadyStateParamDeriv, // for the derivative of the STEADY_STATE operator w.r.t. to a parameter
steadyStateParam2ndDeriv, // for the 2nd derivative of the STEADY_STATE operator w.r.t. to a parameter
expectation,
erf,
diff,
adl
};
enum class BinaryOpcode
{
plus,
minus,
times,
divide,
power,
powerDeriv, // for the derivative of the power function (see trac ticket #78)
equal,
max,
min,
less,
greater,
lessEqual,
greaterEqual,
equalEqual,
different
plus,
minus,
times,
divide,
power,
powerDeriv, // for the derivative of the power function (see trac ticket #78)
equal,
max,
min,
less,
greater,
lessEqual,
greaterEqual,
equalEqual,
different
};
enum class TrinaryOpcode
{
normcdf,
normpdf
normcdf,
normpdf
};
enum class ExternalFunctionType
{
withoutDerivative,
withFirstDerivative,
withFirstAndSecondDerivative,
numericalFirstDerivative,
firstDerivative,
numericalSecondDerivative,
secondDerivative
withoutDerivative,
withFirstDerivative,
withFirstAndSecondDerivative,
numericalFirstDerivative,
firstDerivative,
numericalSecondDerivative,
secondDerivative
};
enum class PriorDistributions
{
noShape = 0,
beta = 1,
gamma = 2,
normal = 3,
invGamma = 4,
invGamma1 = 4,
uniform = 5,
invGamma2 = 6,
dirichlet = 7,
weibull = 8
noShape = 0,
beta = 1,
gamma = 2,
normal = 3,
invGamma = 4,
invGamma1 = 4,
uniform = 5,
invGamma2 = 6,
dirichlet = 7,
weibull = 8
};
struct Block_contain_type
......@@ -1429,7 +1429,7 @@ private:
public:
inline
FBEGINBLOCK_() : size{0}, type{UNKNOWN},
is_linear{false}, endo_nbr{0}, Max_Lag{0}, Max_Lead{0}, u_count_int{0}, nb_col_jacob{0}
is_linear{false}, endo_nbr{0}, Max_Lag{0}, Max_Lead{0}, u_count_int{0}, nb_col_jacob{0}
{
}
inline
......
......@@ -501,7 +501,7 @@ VarRestrictionsStatement::writeOutput(ostream &output, const string &basename, b
output << "struct('eq', " << findIdxInVector(vars, symbol_table.getName(it1->first)) + 1
<< ", 'vars', [";
vector<string> excvars = it1->second.getSymbols();
for (auto & excvar : excvars)
for (auto &excvar : excvars)
output << findIdxInVector(vars, excvar) + 1 << " ";
output << "])";
nrestrictions += it1->second.getSize();
......@@ -775,7 +775,7 @@ DetCondForecast::writeOutput(ostream &output, const string &basename, bool minim
}
vector<string> symbols = symbol_list.get_symbols();
if (symbols.size() > 0)
output << symbols[1] << " = det_cond_forecast(" ;
output << symbols[1] << " = det_cond_forecast(";
for (unsigned int i = 0; i < symbols.size() - 1; i++)
output << symbols[i] << ", ";
if (symbols.size() > 0)
......@@ -1004,7 +1004,7 @@ RamseyPolicyStatement::writeOutput(ostream &output, const string &basename, bool
// Ensure that order 3 implies k_order (#844)
if (auto it = options_list.num_options.find("order"),
it1 = options_list.num_options.find("k_order_solver");
(it1 != options_list.num_options.end() && it1->second == "true")
(it1 != options_list.num_options.end() && it1->second == "true")
|| (it != options_list.num_options.end() && stoi(it->second) >= 3))
output << "options_.k_order_solver = true;" << endl;
......@@ -1404,7 +1404,7 @@ EstimatedParamsStatement::EstimatedParamsStatement(vector<EstimationParams> esti
void
EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
{
for (const auto & it : estim_params_list)
for (const auto &it : estim_params_list)
{
if (it.name == "dsge_prior_weight")
mod_file_struct.dsge_prior_weight_in_estimated_params = true;
......@@ -1429,7 +1429,7 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct, WarningCo
// Check that no parameter/endogenous is declared twice in the block
set<string> already_declared;
set<pair<string, string>> already_declared_corr;
for (const auto & it : estim_params_list)
for (const auto &it : estim_params_list)
{
if (it.type == 3) // Correlation
{
......@@ -1457,7 +1457,7 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct, WarningCo
}
// Fill in mod_file_struct.estimated_parameters (related to #469)
for (const auto & it : estim_params_list)
for (const auto &it : estim_params_list)
if (it.type == 2 && it.name != "dsge_prior_weight")
mod_file_struct.estimated_parameters.insert(symbol_table.getID(it.name));
}
......@@ -1471,7 +1471,7 @@ EstimatedParamsStatement::writeOutput(ostream &output, const string &basename, b
<< "estim_params_.corrn = zeros(0, 11);" << endl
<< "estim_params_.param_vals = zeros(0, 10);" << endl;
for (const auto & it : estim_params_list)
for (const auto &it : estim_params_list)
{
int symb_id = symbol_table.getTypeSpecificID(it.name) + 1;
SymbolType symb_type = symbol_table.getType(it.name);
......@@ -1590,7 +1590,7 @@ EstimatedParamsInitStatement::writeOutput(ostream &output, const string &basenam
bool skipline = false;
for (const auto & it : estim_params_list)
for (const auto &it : estim_params_list)
{
int symb_id = symbol_table.getTypeSpecificID(it.name) + 1;
SymbolType symb_type = symbol_table.getType(it.name);
......@@ -1715,7 +1715,7 @@ EstimatedParamsBoundsStatement::EstimatedParamsBoundsStatement(vector<Estimation
void
EstimatedParamsBoundsStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const
{
for (const auto & it : estim_params_list)
for (const auto &it : estim_params_list)
{
int symb_id = symbol_table.getTypeSpecificID(it.name) + 1;
SymbolType symb_type = symbol_table.getType(it.name);
......@@ -1835,7 +1835,7 @@ void
ObservationTrendsStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const
{
output << "options_.trend_coeff = {};" << endl;
for (const auto & trend_element : trend_elements)
for (const auto &trend_element : trend_elements)
{
SymbolType type = symbol_table.getType(trend_element.first);
if (type == SymbolType::endogenous)
......@@ -1856,7 +1856,7 @@ ObservationTrendsStatement::writeJsonOutput(ostream &output) const
output << R"({"statementName": "observation_trends", )"
<< R"("trends" : {)";
bool printed = false;
for (const auto & trend_element : trend_elements)
for (const auto &trend_element : trend_elements)
{
if (symbol_table.getType(trend_element.first) == SymbolType::endogenous)
{
......@@ -1896,7 +1896,7 @@ OsrParamsStatement::writeOutput(ostream &output, const string &basename, bool mi
<< "M_.osr.param_indices = zeros(length(M_.osr.param_names), 1);" << endl;
int i = 0;
vector<string> symbols = symbol_list.get_symbols();
for (auto & symbol : symbols)
for (auto &symbol : symbols)
output << "M_.osr.param_indices(" << ++i <<") = " << symbol_table.getTypeSpecificID(symbol) + 1 << ";" << endl;
}
......@@ -1933,7 +1933,7 @@ OsrParamsBoundsStatement::writeOutput(ostream &output, const string &basename, b
output << "M_.osr.param_bounds = [-inf(length(M_.osr.param_names), 1), inf(length(M_.osr.param_names), 1)];" << endl;
for (const auto & it : osr_params_list)
for (const auto &it : osr_params_list)
{
output << "M_.osr.param_bounds(strcmp(M_.osr.param_names, '" << it.name << "'), :) = [";
it.low_bound->writeOutput(output);
......@@ -2207,7 +2207,7 @@ ModelComparisonStatement::writeOutput(ostream &output, const string &basename, b
output << "ModelNames_ = {};" << endl;
output << "ModelPriors_ = [];" << endl;
for (const auto & it : filename_list)
for (const auto &it : filename_list)
{
output << "ModelNames_ = { ModelNames_{:} '" << it.first << "'};" << endl;
output << "ModelPriors_ = [ ModelPriors_ ; " << it.second << "];" << endl;
......@@ -2243,7 +2243,7 @@ ModelComparisonStatement::writeJsonOutput(ostream &output) const
}
PlannerObjectiveStatement::PlannerObjectiveStatement(const StaticModel &model_tree_arg) :
model_tree {model_tree_arg}
model_tree{model_tree_arg}
{
}
......@@ -3145,7 +3145,7 @@ int
SvarIdentificationStatement::getMaxLag() const
{
int max_lag = 0;
for (const auto & restriction : restrictions)
for (const auto &restriction : restrictions)
if (restriction.lag > max_lag)
max_lag = restriction.lag;
......@@ -3282,12 +3282,12 @@ MarkovSwitchingStatement::MarkovSwitchingStatement(OptionsList options_list_arg)
{
using namespace boost;
auto it_num_regimes = options_list.num_options.find("ms.number_of_regimes");
assert(it_num_regimes != options_list.num_options.end());
assert(it_num_regimes != options_list.num_options.end());
auto num_regimes = stoi(it_num_regimes->second);
vector<string> tokenizedRestrictions;
split(tokenizedRestrictions, it_num->second, is_any_of("["), token_compress_on);
for (auto & tokenizedRestriction : tokenizedRestrictions)
for (auto &tokenizedRestriction : tokenizedRestrictions)
if (tokenizedRestriction.size() > 0)
{
vector<string> restriction;
......@@ -3859,13 +3859,13 @@ JointPriorStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsoli
void
JointPriorStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const
{
for (const auto & joint_parameter : joint_parameters)
for (const auto &joint_parameter : joint_parameters)
output << "eifind = get_new_or_existing_ei_index('joint_parameter_prior_index', '"
<< joint_parameter << "', '');" << endl
<< "estimation_info.joint_parameter_prior_index(eifind) = {'" << joint_parameter << "'};" << endl;
output << "key = {[";
for (const auto & joint_parameter : joint_parameters)
for (const auto &joint_parameter : joint_parameters)
output << "get_new_or_existing_ei_index('joint_parameter_prior_index', '" << joint_parameter << "', '') ..."
<< endl << " ";
output << "]};" << endl;
......@@ -4734,7 +4734,7 @@ ExtendedPathStatement::writeOutput(ostream &output, const string &basename, bool
{
// Beware: options do not have the same name in the interface and in the M code...
for (const auto & num_option : options_list.num_options)
for (const auto &num_option : options_list.num_options)
if (num_option.first != "periods")
output << "options_." << num_option.first << " = " << num_option.second << ";" << endl;
......@@ -4902,7 +4902,7 @@ GenerateIRFsStatement::writeOutput(ostream &output, const string &basename, bool
return;
output << "options_.irf_opt.irf_shock_graphtitles = { ";
for (const auto & generate_irf_name : generate_irf_names)
for (const auto &generate_irf_name : generate_irf_names)
output << "'" << generate_irf_name << "'; ";
output << "};" << endl;
......@@ -4912,7 +4912,7 @@ GenerateIRFsStatement::writeOutput(ostream &output, const string &basename, bool
for (size_t i = 0; i < generate_irf_names.size(); i++)
{
map<string, double> m = generate_irf_elements[i];
for (auto & it : m)
for (auto &it : m)
output << "options_.irf_opt.irf_shocks(M_.exo_names == '"
<< it.first << "', " << i + 1 << ") = "
<< it.second << ";" << endl;
......
......@@ -95,7 +95,6 @@ public:
void writeJsonOutput(ostream &output) const override;
};
class DetCondForecast : public Statement
{
private:
......
......@@ -86,7 +86,7 @@ SlaveNode::SlaveNode(string computerName_arg, string port_arg, int minCpuNbr_arg
}
}
Cluster::Cluster(member_nodes_t member_nodes_arg) :
Cluster::Cluster(member_nodes_t member_nodes_arg) :
member_nodes{move(member_nodes_arg)}
{
if (member_nodes.empty())
......@@ -276,7 +276,7 @@ ConfigFile::getConfigFileInfo(const string &config_file)
{
vector<string> tokenizedPath;
split(tokenizedPath, tokenizedLine.back(), is_any_of(":"), token_compress_on);
for (auto & it : tokenizedPath)
for (auto &it : tokenizedPath)
if (!it.empty())
{
trim(it);
......@@ -377,7 +377,7 @@ ConfigFile::getConfigFileInfo(const string &config_file)
tokenizer<char_separator<char>> tokens(tokenizedLine.back(), sep);
bool begin_weight = false;
string node_name;
for (const auto & token : tokens)
for (const auto &token : tokens)
{
if (token.compare("(") == 0)
{
......@@ -497,9 +497,9 @@ ConfigFile::addParallelConfFileElement(bool inNode, bool inCluster, const member
}
else
slave_nodes.emplace(name, SlaveNode{computerName, port, minCpuNbr, maxCpuNbr, userName,
password, remoteDrive, remoteDirectory, dynarePath,