/* * Ctmc.h * * Created on: 14.11.2012 * Author: Christian Dehnert */ #ifndef STORM_MODELS_CTMC_H_ #define STORM_MODELS_CTMC_H_ #include #include #include "AbstractDeterministicModel.h" #include "AtomicPropositionsLabeling.h" #include "src/storage/SparseMatrix.h" namespace storm { namespace models { /*! * This class represents a continuous-time Markov chain (CTMC) whose states are * labeled with atomic propositions. */ template class Ctmc : public storm::models::AbstractDeterministicModel { public: /*! * Constructs a CTMC object from the given transition rate matrix and * the given labeling of the states. * @param rateMatrix The transition rate function of the * CTMC given by a matrix. * @param stateLabeling The labeling that assigns a set of atomic * propositions to each state. */ Ctmc(storm::storage::SparseMatrix const& rateMatrix, storm::models::AtomicPropositionsLabeling const& stateLabeling, boost::optional> const& optionalStateRewardVector, boost::optional> const& optionalTransitionRewardMatrix, boost::optional>> const& optionalChoiceLabeling) : AbstractDeterministicModel(rateMatrix, stateLabeling, optionalStateRewardVector, optionalTransitionRewardMatrix, optionalChoiceLabeling) { // Intentionally left empty. } /*! * Constructs a CTMC object from the given transition rate matrix and * the given labeling of the states. * @param rateMatrix The transition rate function of the * CTMC given by a matrix. * @param stateLabeling The labeling that assigns a set of atomic * propositions to each state. */ Ctmc(storm::storage::SparseMatrix&& rateMatrix, storm::models::AtomicPropositionsLabeling&& stateLabeling, boost::optional>&& optionalStateRewardVector, boost::optional>&& optionalTransitionRewardMatrix, boost::optional>>&& optionalChoiceLabeling) // The std::move call must be repeated here because otherwise this calls the copy constructor of the Base Class : AbstractDeterministicModel(std::move(rateMatrix), std::move(stateLabeling), std::move(optionalStateRewardVector), std::move(optionalTransitionRewardMatrix), std::move(optionalChoiceLabeling)) { // Intentionally left empty. } /*! * Copy Constructor. Performs a deep copy of the given CTMC. * @param ctmc A reference to the CTMC that is to be copied. */ Ctmc(Ctmc const & ctmc) : AbstractDeterministicModel(ctmc) { // Intentionally left empty. } /*! * Move Constructor. Performs a move on the given CTMC. * @param ctmc A reference to the CTMC that is to be moved from. */ Ctmc(Ctmc&& ctmc) : AbstractDeterministicModel(std::move(ctmc)) { // Intentionally left empty. } storm::models::ModelType getType() const { return CTMC; } /*! * Calculates a hash over all values contained in this Model. * @return size_t A Hash Value */ virtual std::size_t getHash() const override { return AbstractDeterministicModel::getHash(); } }; } // namespace models } // namespace storm #endif /* STORM_MODELS_DTMC_H_ */