From 484c4e8151b83ae0050567e6055592d6396d7d23 Mon Sep 17 00:00:00 2001 From: PBerger Date: Thu, 13 Jun 2013 17:32:32 +0200 Subject: [PATCH] Added more debugging output into the MDP Model Former-commit-id: 5c2d29f80b1010af233b320755224098c075f0e3 --- src/models/AbstractModel.h | 16 ++++++++++++---- src/models/AbstractNondeterministicModel.h | 5 ++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/models/AbstractModel.h b/src/models/AbstractModel.h index f605218f8..dcb292121 100644 --- a/src/models/AbstractModel.h +++ b/src/models/AbstractModel.h @@ -384,13 +384,21 @@ class AbstractModel: public std::enable_shared_from_this> { */ virtual size_t getHash() const { std::size_t result = 0; - boost::hash_combine(result, transitionMatrix.getHash()); - boost::hash_combine(result, stateLabeling.getHash()); + std::size_t hashTmp = transitionMatrix.getHash(); + std::cout << "Transition Matrix Hash: " << hashTmp << std::endl; + boost::hash_combine(result, hashTmp); + hashTmp = stateLabeling.getHash(); + std::cout << "StateLabeling Hash: " << hashTmp << std::endl; + boost::hash_combine(result, hashTmp); if (stateRewardVector) { - boost::hash_combine(result, storm::utility::Hash::getHash(stateRewardVector.get())); + hashTmp = storm::utility::Hash::getHash(stateRewardVector.get()); + std::cout << "State Reward Vector Hash: " << hashTmp << std::endl; + boost::hash_combine(result, hashTmp); } if (transitionRewardMatrix) { - boost::hash_combine(result, transitionRewardMatrix.get().getHash()); + hashTmp = transitionRewardMatrix.get().getHash(); + std::cout << "Transition Reward Matrix Hash: " << hashTmp << std::endl; + boost::hash_combine(result, hashTmp); } return result; } diff --git a/src/models/AbstractNondeterministicModel.h b/src/models/AbstractNondeterministicModel.h index ba2af13ef..f0ba35990 100644 --- a/src/models/AbstractNondeterministicModel.h +++ b/src/models/AbstractNondeterministicModel.h @@ -132,8 +132,11 @@ class AbstractNondeterministicModel: public AbstractModel { */ virtual size_t getHash() const override { std::size_t result = 0; + std::size_t hashTmp = storm::utility::Hash::getHash(nondeterministicChoiceIndices); + std::cout << "nondeterministicChoiceIndices Hash: " << hashTmp << std::endl; + boost::hash_combine(result, AbstractModel::getHash()); - boost::hash_combine(result, storm::utility::Hash::getHash(nondeterministicChoiceIndices)); + boost::hash_combine(result, hashTmp); return result; }