diff --git a/src/storm-pars/api/region.h b/src/storm-pars/api/region.h index 3665790ab..2cf39ddea 100644 --- a/src/storm-pars/api/region.h +++ b/src/storm-pars/api/region.h @@ -39,7 +39,7 @@ namespace storm { }; template - std::vector> parseRegions(std::string const& inputString, std::set::VariableType> const& consideredVariables, boost::optional splittingThreshold = boost::none) { + std::vector> parseRegions(std::string const& inputString, std::set::VariableType> const& consideredVariables, boost::optional const& splittingThreshold = boost::none) { // If the given input string looks like a file (containing a dot and there exists a file with that name), // we try to parse it as a file, otherwise we assume it's a region string. if (inputString.find(".") != std::string::npos && std::ifstream(inputString).good()) { @@ -50,12 +50,12 @@ namespace storm { } template - storm::storage::ParameterRegion createRegion(std::string const& inputString, std::set::VariableType> const& consideredVariables, boost::optional splittingThreshold= boost::none) { + storm::storage::ParameterRegion createRegion(std::string const& inputString, std::set::VariableType> const& consideredVariables, boost::optional const& splittingThreshold = boost::none) { return storm::parser::ParameterRegionParser().createRegion(inputString, consideredVariables, splittingThreshold); } template - std::vector> parseRegions(std::string const& inputString, storm::models::ModelBase const& model, boost::optional splittingThreshold= boost::none) { + std::vector> parseRegions(std::string const& inputString, storm::models::ModelBase const& model, boost::optional const& splittingThreshold = boost::none) { std::set::VariableType> modelParameters; if (model.isSparseModel()) { auto const& sparseModel = dynamic_cast const&>(model); @@ -69,7 +69,7 @@ namespace storm { } template - std::vector> createRegion(std::string const& inputString, storm::models::ModelBase const& model, boost::optional splittingThreshold= boost::none) { + std::vector> createRegion(std::string const& inputString, storm::models::ModelBase const& model, boost::optional const& splittingThreshold = boost::none) { std::set::VariableType> modelParameters; if (model.isSparseModel()) { auto const& sparseModel = dynamic_cast const&>(model); @@ -83,7 +83,7 @@ namespace storm { } template - storm::storage::ParameterRegion parseRegion(std::string const& inputString, std::set::VariableType> const& consideredVariables, boost::optional splittingThreshold= boost::none) { + storm::storage::ParameterRegion parseRegion(std::string const& inputString, std::set::VariableType> const& consideredVariables, boost::optional const& splittingThreshold = boost::none) { // Handle the "empty region" case if (inputString == "" && consideredVariables.empty()) { return storm::storage::ParameterRegion(); @@ -95,7 +95,7 @@ namespace storm { } template - storm::storage::ParameterRegion parseRegion(std::string const& inputString, storm::models::ModelBase const& model, boost::optional splittingThreshold= boost::none) { + storm::storage::ParameterRegion parseRegion(std::string const& inputString, storm::models::ModelBase const& model, boost::optional const& splittingThreshold = boost::none) { // Handle the "empty region" case if (inputString == "" && !model.hasParameters()) { return storm::storage::ParameterRegion(); diff --git a/src/storm-pars/parser/ParameterRegionParser.cpp b/src/storm-pars/parser/ParameterRegionParser.cpp index 4dcb95708..ca6dcd6c3 100644 --- a/src/storm-pars/parser/ParameterRegionParser.cpp +++ b/src/storm-pars/parser/ParameterRegionParser.cpp @@ -42,7 +42,7 @@ namespace storm { } template - storm::storage::ParameterRegion ParameterRegionParser::parseRegion(std::string const& regionString, std::set const& consideredVariables, boost::optional splittingThreshold) { + storm::storage::ParameterRegion ParameterRegionParser::parseRegion(std::string const& regionString, std::set const& consideredVariables, boost::optional const& splittingThreshold) { Valuation lowerBoundaries; Valuation upperBoundaries; std::vector parameterBoundaries; @@ -66,7 +66,7 @@ namespace storm { } template - storm::storage::ParameterRegion ParameterRegionParser::createRegion(std::string const& regionBound, std::set const& consideredVariables, boost::optional splittingThreshold) { + storm::storage::ParameterRegion ParameterRegionParser::createRegion(std::string const& regionBound, std::set const& consideredVariables, boost::optional const& splittingThreshold) { Valuation lowerBoundaries; Valuation upperBoundaries; std::vector parameterBoundaries; @@ -84,7 +84,7 @@ namespace storm { } template - std::vector> ParameterRegionParser::parseMultipleRegions(std::string const& regionsString, std::set const& consideredVariables, boost::optional splittingThreshold) { + std::vector> ParameterRegionParser::parseMultipleRegions(std::string const& regionsString, std::set const& consideredVariables, boost::optional const& splittingThreshold) { std::vector> result; std::vector regionsStrVec; boost::split(regionsStrVec, regionsString, boost::is_any_of(";")); @@ -97,7 +97,7 @@ namespace storm { } template - std::vector> ParameterRegionParser::parseMultipleRegionsFromFile(std::string const& fileName, std::set const& consideredVariables, boost::optional splittingThreshold) { + std::vector> ParameterRegionParser::parseMultipleRegionsFromFile(std::string const& fileName, std::set const& consideredVariables, boost::optional const& splittingThreshold) { // Open file and initialize result. std::ifstream inputFileStream; diff --git a/src/storm-pars/parser/ParameterRegionParser.h b/src/storm-pars/parser/ParameterRegionParser.h index fb574248e..37b59e209 100644 --- a/src/storm-pars/parser/ParameterRegionParser.h +++ b/src/storm-pars/parser/ParameterRegionParser.h @@ -25,21 +25,21 @@ namespace storm { * Parse a single region from a string of the form "0.3<=p<=0.5,0.4<=q<=0.7". * */ - static storm::storage::ParameterRegion parseRegion(std::string const& regionString, std::set const& consideredVariables, boost::optional splittingThreshold = boost::none); - static storm::storage::ParameterRegion createRegion(std::string const& regionBound, std::set const& consideredVariables, boost::optional splittingThreshold = boost::none); + static storm::storage::ParameterRegion parseRegion(std::string const& regionString, std::set const& consideredVariables, boost::optional const& splittingThreshold = boost::none); + static storm::storage::ParameterRegion createRegion(std::string const& regionBound, std::set const& consideredVariables, boost::optional const& splittingThreshold = boost::none); /* * Parse a vector of region from a string of the form "0.3<=p<=0.5,0.4<=q<=0.7;0.1<=p<=0.3,0.2<=q<=0.4". * */ - static std::vector> parseMultipleRegions(std::string const& regionsString, std::set const& consideredVariables, boost::optional splittingThreshold = boost::none); + static std::vector> parseMultipleRegions(std::string const& regionsString, std::set const& consideredVariables, boost::optional const& splittingThreshold = boost::none); /* * Parse multiple regions from a file * */ - static std::vector> parseMultipleRegionsFromFile(std::string const& fileName, std::set const& consideredVariables, boost::optional splittingThreshold = boost::none); + static std::vector> parseMultipleRegionsFromFile(std::string const& fileName, std::set const& consideredVariables, boost::optional const& splittingThreshold = boost::none); }; }