Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
preprocessor
Commits
e95699ff
Commit
e95699ff
authored
May 10, 2011
by
Houtan Bastani
Browse files
cosmetic change
parent
912b22d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
ExprNode.cc
View file @
e95699ff
...
...
@@ -422,20 +422,6 @@ NumConstNode::substituteExpectation(subst_table_t &subst_table, vector<BinaryOpN
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
NumConstNode
::
isNumConstNodeEqualTo
(
double
value
)
const
{
...
...
@@ -469,6 +455,20 @@ NumConstNode::removeTrendLeadLag(map<int, expr_t> trend_symbols_map) const
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
VariableNode
::
prepareForDerivation
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment