cosmetic change
parent
912b22d0e9
commit
e95699ffeb
28
ExprNode.cc
28
ExprNode.cc
|
@ -422,20 +422,6 @@ NumConstNode::substituteExpectation(subst_table_t &subst_table, vector<BinaryOpN
|
||||||
return const_cast<NumConstNode *>(this);
|
return const_cast<NumConstNode *>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
VariableNode::VariableNode(DataTree &datatree_arg, int symb_id_arg, int lag_arg) :
|
|
||||||
ExprNode(datatree_arg),
|
|
||||||
symb_id(symb_id_arg),
|
|
||||||
type(datatree.symbol_table.getType(symb_id_arg)),
|
|
||||||
lag(lag_arg)
|
|
||||||
{
|
|
||||||
// Add myself to the variable map
|
|
||||||
datatree.variable_node_map[make_pair(symb_id, lag)] = this;
|
|
||||||
|
|
||||||
// It makes sense to allow a lead/lag on parameters: during steady state calibration, endogenous and parameters can be swapped
|
|
||||||
assert(type != eExternalFunction
|
|
||||||
&& (lag == 0 || (type != eModelLocalVariable && type != eModFileLocalVariable)));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
NumConstNode::isNumConstNodeEqualTo(double value) const
|
NumConstNode::isNumConstNodeEqualTo(double value) const
|
||||||
{
|
{
|
||||||
|
@ -469,6 +455,20 @@ NumConstNode::removeTrendLeadLag(map<int, expr_t> trend_symbols_map) const
|
||||||
return const_cast<NumConstNode *>(this);
|
return const_cast<NumConstNode *>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VariableNode::VariableNode(DataTree &datatree_arg, int symb_id_arg, int lag_arg) :
|
||||||
|
ExprNode(datatree_arg),
|
||||||
|
symb_id(symb_id_arg),
|
||||||
|
type(datatree.symbol_table.getType(symb_id_arg)),
|
||||||
|
lag(lag_arg)
|
||||||
|
{
|
||||||
|
// Add myself to the variable map
|
||||||
|
datatree.variable_node_map[make_pair(symb_id, lag)] = this;
|
||||||
|
|
||||||
|
// It makes sense to allow a lead/lag on parameters: during steady state calibration, endogenous and parameters can be swapped
|
||||||
|
assert(type != eExternalFunction
|
||||||
|
&& (lag == 0 || (type != eModelLocalVariable && type != eModFileLocalVariable)));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VariableNode::prepareForDerivation()
|
VariableNode::prepareForDerivation()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue