Browse Source
Added a Hash Class in the Utility Namespace.
Added a Hash Class in the Utility Namespace.
Added a function getHash() which returns a size_t to most of the used Models and Containers.
Former-commit-id: ed52aa3996
main
11 changed files with 157 additions and 0 deletions
-
8src/models/AbstractDeterministicModel.h
-
18src/models/AbstractModel.h
-
11src/models/AbstractNondeterministicModel.h
-
25src/models/AtomicPropositionsLabeling.h
-
8src/models/Ctmc.h
-
8src/models/Ctmdp.h
-
8src/models/Dtmc.h
-
7src/models/Mdp.h
-
19src/storage/BitVector.h
-
20src/storage/SparseMatrix.h
-
25src/utility/Hash.h
@ -0,0 +1,25 @@ |
|||
#ifndef STORM_UTILITY_HASH_H_ |
|||
#define STORM_UTILITY_HASH_H_ |
|||
|
|||
#include <boost/functional/hash.hpp> |
|||
#include <functional> |
|||
#include <vector> |
|||
|
|||
namespace storm { |
|||
namespace utility { |
|||
|
|||
template<class T> |
|||
class Hash { |
|||
public: |
|||
static std::size_t getHash(std::vector<T> const& target) { |
|||
return boost::hash_range(target.begin(), target.end()); |
|||
} |
|||
private: |
|||
Hash() {} |
|||
~Hash() {} |
|||
}; |
|||
|
|||
} |
|||
} |
|||
|
|||
#endif // STORM_UTILITY_HASH_H_ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue