From dc92696cc3bc10376fb3220add60748f737500d7 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Sat, 31 Mar 2018 16:31:54 +0200 Subject: [PATCH] Jani: make edge-index encoding static functions --- src/storm/storage/jani/Model.cpp | 4 ++-- src/storm/storage/jani/Model.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/storm/storage/jani/Model.cpp b/src/storm/storage/jani/Model.cpp index 37031bb4b..7c0709516 100644 --- a/src/storm/storage/jani/Model.cpp +++ b/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 Model::decodeAutomatonAndEdgeIndices(uint64_t index) const { + std::pair Model::decodeAutomatonAndEdgeIndices(uint64_t index) { return std::make_pair(index >> 32, index & ((1ull << 32) - 1)); } diff --git a/src/storm/storage/jani/Model.h b/src/storm/storage/jani/Model.h index f45f78b29..0cfeb772e 100644 --- a/src/storm/storage/jani/Model.h +++ b/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 decodeAutomatonAndEdgeIndices(uint64_t index) const; + static uint64_t encodeAutomatonAndEdgeIndices(uint64_t automatonIndex, uint64_t edgeIndex); + static std::pair decodeAutomatonAndEdgeIndices(uint64_t index); /*! * Creates a new model that only contains the selected edges. The edge indices encode the automata and