17 std::string
const& fileName, std::set<VariableType>
const& consideredVariables) {
19 std::ifstream inputFileStream;
22 std::set<VariableType> monotoneIncrVars;
23 std::set<VariableType> monotoneDecrVars;
27 std::string fileContent((std::istreambuf_iterator<char>(inputFileStream)), (std::istreambuf_iterator<char>()));
28 std::vector<std::string> fileSplitted;
30 boost::split(fileSplitted, fileContent, boost::is_any_of(
";"));
31 STORM_LOG_THROW(fileSplitted.size() == 2, storm::exceptions::WrongFormatException,
"Expecting content to contain \";\" between monotone variables");
32 std::vector<std::string> monotoneIncrVarsString;
33 boost::split(monotoneIncrVarsString, fileSplitted[0], boost::is_any_of(
" "));
34 std::vector<std::string> monotoneDecrVarsString;
35 boost::split(monotoneDecrVarsString, fileSplitted[0], boost::is_any_of(
" "));
37 for (
auto varString : monotoneIncrVarsString) {
39 for (
auto const& v : consideredVariables) {
40 std::stringstream stream;
42 if (varString == stream.str()) {
47 monotoneIncrVars.insert(var);
49 for (
auto varString : monotoneDecrVarsString) {
51 for (
auto const& v : consideredVariables) {
52 std::stringstream stream;
54 if (varString == stream.str()) {
59 monotoneDecrVars.insert(var);
62 }
catch (std::exception& e) {
70 return {std::move(monotoneIncrVars), std::move(monotoneDecrVars)};
void openFile(std::string const &filepath, std::ofstream &filestream, bool append=false, bool silent=false)
Open the given file for writing.