add an upper bound to loops in VariableTable::computeDynJacobianCols()
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1997 ac1d8469-bf42-47a9-8791-bf33cf982152issue#70
parent
bc2348f0b7
commit
39b19c5bae
|
@ -104,19 +104,19 @@ VariableTable::computeDynJacobianCols() throw (DynJacobianColsAlreadyComputedExc
|
||||||
|
|
||||||
// Assign the first columns to endogenous, using the lexicographic order over (lag, symbol_id) implemented in variable_table map
|
// Assign the first columns to endogenous, using the lexicographic order over (lag, symbol_id) implemented in variable_table map
|
||||||
int sorted_id = 0;
|
int sorted_id = 0;
|
||||||
while(it->first.first.first == eEndogenous)
|
while(it->first.first.first == eEndogenous && it != variable_table.end())
|
||||||
{
|
{
|
||||||
dyn_jacobian_cols_table[it->second] = sorted_id++;
|
dyn_jacobian_cols_table[it->second] = sorted_id++;
|
||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assign subsequent columns to exogenous and then exogenous deterministic, using an offset + symbol_id
|
// Assign subsequent columns to exogenous and then exogenous deterministic, using an offset + symbol_id
|
||||||
while(it->first.first.first == eExogenous)
|
while(it->first.first.first == eExogenous && it != variable_table.end())
|
||||||
{
|
{
|
||||||
dyn_jacobian_cols_table[it->second] = var_endo_nbr + it->first.second;
|
dyn_jacobian_cols_table[it->second] = var_endo_nbr + it->first.second;
|
||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
while(it->first.first.first == eExogenousDet)
|
while(it->first.first.first == eExogenousDet && it != variable_table.end())
|
||||||
{
|
{
|
||||||
dyn_jacobian_cols_table[it->second] = var_endo_nbr + symbol_table.exo_nbr + it->first.second;
|
dyn_jacobian_cols_table[it->second] = var_endo_nbr + symbol_table.exo_nbr + it->first.second;
|
||||||
it++;
|
it++;
|
||||||
|
|
Loading…
Reference in New Issue