Browse Source

Jani: make edge-index encoding static functions

tempestpy_adaptions
Sebastian Junges 7 years ago
parent
commit
dc92696cc3
  1. 4
      src/storm/storage/jani/Model.cpp
  2. 4
      src/storm/storage/jani/Model.h

4
src/storm/storage/jani/Model.cpp

@ -1156,11 +1156,11 @@ namespace storm {
return false;
}
uint64_t Model::encodeAutomatonAndEdgeIndices(uint64_t automatonIndex, uint64_t edgeIndex) const {
uint64_t Model::encodeAutomatonAndEdgeIndices(uint64_t automatonIndex, uint64_t edgeIndex) {
return automatonIndex << 32 | edgeIndex;
}
std::pair<uint64_t, uint64_t> Model::decodeAutomatonAndEdgeIndices(uint64_t index) const {
std::pair<uint64_t, uint64_t> Model::decodeAutomatonAndEdgeIndices(uint64_t index) {
return std::make_pair(index >> 32, index & ((1ull << 32) - 1));
}

4
src/storm/storage/jani/Model.h

@ -452,8 +452,8 @@ namespace storm {
/*!
* Encode and decode a tuple of automaton and edge index in one 64-bit index.
*/
uint64_t encodeAutomatonAndEdgeIndices(uint64_t automatonIndex, uint64_t edgeIndex) const;
std::pair<uint64_t, uint64_t> decodeAutomatonAndEdgeIndices(uint64_t index) const;
static uint64_t encodeAutomatonAndEdgeIndices(uint64_t automatonIndex, uint64_t edgeIndex);
static std::pair<uint64_t, uint64_t> decodeAutomatonAndEdgeIndices(uint64_t index);
/*!
* Creates a new model that only contains the selected edges. The edge indices encode the automata and

Loading…
Cancel
Save