Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SamplingSettings.cpp
Go to the documentation of this file.
2
7
9
10const std::string SamplingSettings::moduleName = "sampling";
11const std::string samplesOptionName = "samples";
12const std::string samplesGraphPreservingOptionName = "samples-graph-preserving";
13const std::string sampleExactOptionName = "sample-exact";
14
16 this->addOption(
17 storm::settings::OptionBuilder(moduleName, samplesOptionName, false, "The points at which to sample the model.")
18 .addArgument(
20 "samples", "The samples are semicolon-separated entries of the form 'Var1=Val1:Val2:...:Valk,Var2=... that span the sample spaces.")
22 .build())
23 .build());
25 "Sets whether it can be assumed that the samples are graph-preserving.")
26 .build());
27 this->addOption(storm::settings::OptionBuilder(moduleName, sampleExactOptionName, false, "Sets whether to sample using exact arithmetic.").build());
28}
29
30std::string SamplingSettings::getSamples() const {
31 return this->getOption(samplesOptionName).getArgumentByName("samples").getValueAsString();
32}
33
35 return this->getOption(samplesGraphPreservingOptionName).getHasOptionBeenSet();
36}
37
39 return this->getOption(sampleExactOptionName).getHasOptionBeenSet();
40}
41} // namespace storm::settings::modules
virtual std::string getValueAsString() const =0
Retrieves the value of this argument as a string.
static ArgumentBuilder createStringArgument(std::string const &name, std::string const &description)
Creates a string argument with the given parameters.
This class provides the interface to create an option...
ArgumentBase const & getArgumentByName(std::string const &argumentName) const
Returns a reference to the argument with the specified long name.
Definition Option.cpp:79
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
Definition Option.cpp:125
This is the base class of the settings for a particular module.
void addOption(std::shared_ptr< Option > const &option)
Adds and registers the given option.
Option & getOption(std::string const &longName)
Retrieves the option with the given long name.
bool isSampleExactSet() const
Retrieves whether samples are to be computed exactly.
bool isSamplesAreGraphPreservingSet() const
Retrieves whether the samples are graph preserving.
std::string getSamples() const
Retrieves the samples as a comma-separated list of samples for each (relevant) variable,...
const std::string sampleExactOptionName
const std::string samplesGraphPreservingOptionName
const std::string samplesOptionName
SettingsType const & getModule()
Get module.