Commit 6a958311 authored by Houtan Bastani's avatar Houtan Bastani

use front inserter instead of back inserter for unary/diff auxiliary equations

parent e5aefb9f
......@@ -5443,7 +5443,7 @@ DynamicModel::substituteUnaryOps(StaticModel &static_model, vector<int> &eqnumbe
for (auto & neweq : neweqs)
addEquation(neweq, -1);
copy(neweqs.begin(), neweqs.end(), back_inserter(diff_aux_equations));
copy(neweqs.begin(), neweqs.end(), front_inserter(diff_aux_equations));
if (subst_table.size() > 0)
cout << "Substitution of Unary Ops: added " << neweqs.size() << " auxiliary variables and equations." << endl;
......@@ -5483,7 +5483,7 @@ DynamicModel::substituteDiff(StaticModel &static_model, ExprNode::subst_table_t
for (auto & neweq : neweqs)
addEquation(neweq, -1);
copy(neweqs.begin(), neweqs.end(), back_inserter(diff_aux_equations));
copy(neweqs.begin(), neweqs.end(), front_inserter(diff_aux_equations));
if (diff_subst_table.size() > 0)
cout << "Substitution of Diff operator: added " << neweqs.size() << " auxiliary variables and equations." << endl;
......@@ -5492,7 +5492,7 @@ DynamicModel::substituteDiff(StaticModel &static_model, ExprNode::subst_table_t
void
DynamicModel::combineDiffAuxEquations()
{
copy(diff_aux_equations.begin(), diff_aux_equations.end(), back_inserter(aux_equations));
copy(diff_aux_equations.begin(), diff_aux_equations.end(), front_inserter(aux_equations));
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment