diff --git a/src/storm/solver/helper/OptimisticValueIterationHelper.cpp b/src/storm/solver/helper/OptimisticValueIterationHelper.cpp index 076782e40..df89bcaa5 100644 --- a/src/storm/solver/helper/OptimisticValueIterationHelper.cpp +++ b/src/storm/solver/helper/OptimisticValueIterationHelper.cpp @@ -14,48 +14,6 @@ namespace storm { namespace helper { namespace oviinternal { - template - ValueType computeMaxAbsDiff(std::vector const& allOldValues, std::vector const& allNewValues, storm::storage::BitVector const& relevantValues) { - ValueType result = storm::utility::zero(); - for (auto value : relevantValues) { - result = storm::utility::max(result, storm::utility::abs(allNewValues[value] - allOldValues[value])); - } - return result; - } - - template - ValueType computeMaxAbsDiff(std::vector const& allOldValues, std::vector const& allNewValues) { - ValueType result = storm::utility::zero(); - for (uint64_t i = 0; i < allOldValues.size(); ++i) { - result = storm::utility::max(result, storm::utility::abs(allNewValues[i] - allOldValues[i])); - } - return result; - } - - template - ValueType computeMaxRelDiff(std::vector const& allOldValues, std::vector const& allNewValues, storm::storage::BitVector const& relevantValues) { - ValueType result = storm::utility::zero(); - for (auto i : relevantValues) { - STORM_LOG_ASSERT(!storm::utility::isZero(allNewValues[i]) || storm::utility::isZero(allOldValues[i]), "Unexpected entry in iteration vector."); - if (!storm::utility::isZero(allNewValues[i])) { - result = storm::utility::max(result, storm::utility::abs(allNewValues[i] - allOldValues[i]) / allNewValues[i]); - } - } - return result; - } - - template - ValueType computeMaxRelDiff(std::vector const& allOldValues, std::vector const& allNewValues) { - ValueType result = storm::utility::zero(); - for (uint64_t i = 0; i < allOldValues.size(); ++i) { - STORM_LOG_WARN_COND(!storm::utility::isZero(allNewValues[i]) || storm::utility::isZero(allOldValues[i]), "Unexpected entry in iteration vector."); - if (!storm::utility::isZero(allNewValues[i])) { - result = storm::utility::max(result, storm::utility::abs(allNewValues[i] - allOldValues[i]) / allNewValues[i]); - } - } - return result; - } - template ValueType updateIterationPrecision(storm::Environment const& env, ValueType const& diff) { auto factor = storm::utility::convertNumber(env.solver().ovi().getPrecisionUpdateFactor());