Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::models::ModelBase Class Referenceabstract

#include <ModelBase.h>

Inheritance diagram for storm::models::ModelBase:
Collaboration diagram for storm::models::ModelBase:

Public Member Functions

 ModelBase (ModelType const &modelType)
 Constructs a model of the given type.
 
virtual ~ModelBase ()
 
template<typename ModelType >
std::shared_ptr< ModelTypeas ()
 Casts the model into the model type given by the template parameter.
 
template<typename ModelType >
std::shared_ptr< ModelType const > as () const
 Casts the model into the model type given by the template parameter.
 
virtual ModelType getType () const
 Return the actual type of the model.
 
virtual uint_fast64_t getNumberOfStates () const =0
 Returns the number of states of the model.
 
virtual uint_fast64_t getNumberOfTransitions () const =0
 Returns the number of (non-zero) transitions of the model.
 
virtual uint_fast64_t getNumberOfChoices () const =0
 Returns the number of choices ine the model.
 
virtual void printModelInformationToStream (std::ostream &out) const =0
 Prints information about the model to the specified stream.
 
virtual bool isSparseModel () const
 Checks whether the model is a sparse model.
 
virtual bool isSymbolicModel () const
 Checks whether the model is a symbolic model.
 
bool isOfType (storm::models::ModelType const &modelType) const
 Checks whether the model is of the given type.
 
bool isNondeterministicModel () const
 Returns true if the model is a nondeterministic model.
 
bool isDiscreteTimeModel () const
 Returns true if the model is a descrete-time model.
 
virtual bool supportsParameters () const
 Checks whether the model supports parameters.
 
virtual bool hasParameters () const
 Checks whether the model has parameters.
 
virtual bool isExact () const
 Checks whether the model is exact.
 
virtual bool isPartiallyObservable () const
 
virtual void reduceToStateBasedRewards ()=0
 Converts the transition rewards of all reward models to state-based rewards.
 
virtual bool hasRewardModel (std::string const &rewardModelName) const =0
 Retrieves whether the model has a reward model with the given name.
 
virtual bool hasUniqueRewardModel () const =0
 
virtual std::string const & getUniqueRewardModelName () const =0
 

Detailed Description

Definition at line 11 of file ModelBase.h.

Constructor & Destructor Documentation

◆ ModelBase()

storm::models::ModelBase::ModelBase ( ModelType const &  modelType)
inline

Constructs a model of the given type.

Parameters
modelTypeThe type of the model.

Definition at line 18 of file ModelBase.h.

◆ ~ModelBase()

virtual storm::models::ModelBase::~ModelBase ( )
inlinevirtual

Definition at line 25 of file ModelBase.h.

Member Function Documentation

◆ as() [1/2]

template<typename ModelType >
std::shared_ptr< ModelType > storm::models::ModelBase::as ( )
inline

Casts the model into the model type given by the template parameter.

Returns
A shared pointer of the requested type that points to the model if the cast succeeded and a null pointer otherwise.

Definition at line 36 of file ModelBase.h.

◆ as() [2/2]

template<typename ModelType >
std::shared_ptr< ModelType const > storm::models::ModelBase::as ( ) const
inline

Casts the model into the model type given by the template parameter.

Returns
A shared pointer of the requested type that points to the model if the cast succeeded and a null pointer otherwise.

Definition at line 47 of file ModelBase.h.

◆ getNumberOfChoices()

◆ getNumberOfStates()

◆ getNumberOfTransitions()

◆ getType()

ModelType storm::models::ModelBase::getType ( ) const
virtual

Return the actual type of the model.

Each model must implement this method.

Returns
Type of the model.

Definition at line 7 of file ModelBase.cpp.

◆ getUniqueRewardModelName()

◆ hasParameters()

◆ hasRewardModel()

◆ hasUniqueRewardModel()

◆ isDiscreteTimeModel()

bool storm::models::ModelBase::isDiscreteTimeModel ( ) const

Returns true if the model is a descrete-time model.

Definition at line 33 of file ModelBase.cpp.

◆ isExact()

◆ isNondeterministicModel()

bool storm::models::ModelBase::isNondeterministicModel ( ) const

Returns true if the model is a nondeterministic model.

Returns
True iff the model is a nondeterministic model.

Definition at line 23 of file ModelBase.cpp.

◆ isOfType()

bool storm::models::ModelBase::isOfType ( storm::models::ModelType const &  modelType) const

Checks whether the model is of the given type.

Parameters
modelTypeThe model type to check for.
Returns
True iff the model is of the given type.

Definition at line 19 of file ModelBase.cpp.

◆ isPartiallyObservable()

bool storm::models::ModelBase::isPartiallyObservable ( ) const
virtual

Reimplemented in storm::models::sparse::Pomdp< ValueType, RewardModelType >.

Definition at line 42 of file ModelBase.cpp.

◆ isSparseModel()

◆ isSymbolicModel()

bool storm::models::ModelBase::isSymbolicModel ( ) const
virtual

Checks whether the model is a symbolic model.

Returns
True iff the model is a symbolic model.

Reimplemented in storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, and storm::models::symbolic::Model< Type, ValueType >.

Definition at line 15 of file ModelBase.cpp.

◆ printModelInformationToStream()

virtual void storm::models::ModelBase::printModelInformationToStream ( std::ostream &  out) const
pure virtual

Prints information about the model to the specified stream.

Parameters
outThe stream the information is to be printed to.

Implemented in storm::models::sparse::MarkovAutomaton< ValueType, RewardModelType >, storm::models::sparse::Model< CValueType, CRewardModelType >, storm::models::sparse::Model< double, RM >, storm::models::sparse::Model< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::Model< FunctionType, StandardRewardModel< FunctionType > >, storm::models::sparse::Model< ValueType >, storm::models::sparse::Model< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::sparse::NondeterministicModel< ValueType, RewardModelType >, storm::models::sparse::NondeterministicModel< double, RM >, storm::models::sparse::NondeterministicModel< double, storm::models::sparse::StandardRewardModel< double > >, storm::models::sparse::NondeterministicModel< ValueType, StandardRewardModel< ValueType > >, storm::models::sparse::NondeterministicModel< ValueType, storm::models::sparse::StandardRewardModel< ValueType > >, storm::models::sparse::Pomdp< ValueType, RewardModelType >, storm::models::symbolic::Model< Type, CValueType >, storm::models::symbolic::Model< DdType, ValueType >, storm::models::symbolic::Model< Type, double >, storm::models::symbolic::Model< Type, ValueType >, storm::models::symbolic::NondeterministicModel< Type, ValueType >, storm::models::symbolic::NondeterministicModel< DdType, ValueType >, storm::models::symbolic::NondeterministicModel< Type, double >, and storm::models::symbolic::NondeterministicModel< Type, ValueType >.

◆ reduceToStateBasedRewards()

◆ supportsParameters()


The documentation for this class was generated from the following files: