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
7d16fff7
Verified
Commit
7d16fff7
authored
Feb 21, 2019
by
Sébastien Villemot
Browse files
Further simplifications
parent
be023bda
Pipeline
#859
passed with stage
in 1 minute and 26 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/DynamicModel.cc
View file @
7d16fff7
...
...
@@ -57,7 +57,7 @@ DynamicModel::copyHelper(const DynamicModel &m)
first_chain_rule_derivatives[it.first] = f(it.second);
for (const auto &it : m.equation_type_and_normalized_equation)
equation_type_and_normalized_equation.
push
_back(
{
it.first, f(it.second)
}
);
equation_type_and_normalized_equation.
emplace
_back(it.first, f(it.second));
for (const auto &it : m.blocks_derivatives)
{
...
...
@@ -4464,7 +4464,7 @@ DynamicModel::getPacMaxLag(const string &pac_model_name, map<pair<string, string
break;
}
string eq = eqtag_and_lag[{pac_model_name, eqtag}].first;
eqtag_and_lag[{pac_model_name, eqtag}] = {eq, equation->PacMaxLag(
(*(
endogs.begin()
)).
first)};
eqtag_and_lag[{pac_model_name, eqtag}] = {eq, equation->PacMaxLag(endogs.begin()
->
first)};
}
}
...
...
src/ModelEquationBlock.cc
View file @
7d16fff7
...
...
@@ -36,7 +36,7 @@ SteadyStateModel::SteadyStateModel(const SteadyStateModel &m) :
static_model
{
m
.
static_model
}
{
for
(
const
auto
&
it
:
m
.
def_table
)
def_table
.
push
_back
(
{
it
.
first
,
it
.
second
->
clone
(
*
this
)
}
);
def_table
.
emplace
_back
(
it
.
first
,
it
.
second
->
clone
(
*
this
));
}
SteadyStateModel
&
...
...
@@ -48,7 +48,7 @@ SteadyStateModel::operator=(const SteadyStateModel &m)
def_table
.
clear
();
for
(
const
auto
&
it
:
m
.
def_table
)
def_table
.
push
_back
(
{
it
.
first
,
it
.
second
->
clone
(
*
this
)
}
);
def_table
.
emplace
_back
(
it
.
first
,
it
.
second
->
clone
(
*
this
));
return
*
this
;
}
...
...
@@ -298,7 +298,7 @@ Epilogue::Epilogue(const Epilogue &m) :
DynamicModel
{
m
}
{
for
(
const
auto
&
it
:
m
.
def_table
)
def_table
.
push
_back
(
{
it
.
first
,
it
.
second
->
clone
(
*
this
)
}
);
def_table
.
emplace
_back
(
it
.
first
,
it
.
second
->
clone
(
*
this
));
}
Epilogue
&
...
...
@@ -308,7 +308,7 @@ Epilogue::operator=(const Epilogue &m)
def_table
.
clear
();
for
(
const
auto
&
it
:
m
.
def_table
)
def_table
.
push
_back
(
{
it
.
first
,
it
.
second
->
clone
(
*
this
)
}
);
def_table
.
emplace
_back
(
it
.
first
,
it
.
second
->
clone
(
*
this
));
return
*
this
;
}
...
...
src/ModelTree.cc
View file @
7d16fff7
...
...
@@ -411,7 +411,7 @@ ModelTree::evaluateAndReduceJacobian(const eval_context_t &eval_context, jacob_m
{
if
(
verbose
)
cout
<<
"the coefficient related to variable "
<<
var
<<
" with lag "
<<
lag
<<
" in equation "
<<
eq
<<
" is equal to "
<<
val
<<
" and is set to 0 in the incidence matrix (size="
<<
symbol_table
.
endo_nbr
()
<<
")"
<<
endl
;
jacobian_elements_to_delete
.
insert
({
eq
,
deriv_id
}
);
jacobian_elements_to_delete
.
emplace
(
eq
,
deriv_id
);
}
else
{
...
...
src/StaticModel.cc
View file @
7d16fff7
...
...
@@ -55,7 +55,7 @@ StaticModel::copyHelper(const StaticModel &m)
first_chain_rule_derivatives
[
it
.
first
]
=
f
(
it
.
second
);
for
(
const
auto
&
it
:
m
.
equation_type_and_normalized_equation
)
equation_type_and_normalized_equation
.
push
_back
(
{
it
.
first
,
f
(
it
.
second
)
}
);
equation_type_and_normalized_equation
.
emplace
_back
(
it
.
first
,
f
(
it
.
second
));
for
(
const
auto
&
it
:
m
.
blocks_derivatives
)
{
...
...
Sébastien Villemot
@sebastien
mentioned in commit
d9f7ac4c
·
Mar 08, 2019
mentioned in commit
d9f7ac4c
mentioned in commit d9f7ac4c9be88f1e6d8b953c0c71195e1fa31f8c
Toggle commit list
Write
Preview
Markdown
is supported
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