preprocessor: aesthetic fix: make writing to .m file nicer

issue#70
Houtan Bastani 2017-05-04 16:50:19 +02:00
parent a2771a62ad
commit c0f818a9e6
1 changed files with 13 additions and 2 deletions

View File

@ -221,8 +221,19 @@ VarModelStatement::createVarModelMFunction(ostream &output, const map<string, se
stringstream ss;
set<int> horizons = var_expectation_functions_to_write.find(name)->second;
for (set<int>::const_iterator it = horizons.begin(); it != horizons.end(); it++)
ss << *it << " ";
output << "writeVarExpectationFunction('" << name << "', [" << ss.rdbuf() << "]);" << endl;
{
if (it != horizons.begin())
ss << " ";
ss << *it;
}
output << "writeVarExpectationFunction('" << name << "', ";
if (horizons.size() > 1)
output << "[";
output << ss.rdbuf();
if (horizons.size() > 1)
output << "]";
output << ");" << endl;
}
StochSimulStatement::StochSimulStatement(const SymbolList &symbol_list_arg,