Browse Source

fixed some convertNumber applications

tempestpy_adaptions
dehnert 7 years ago
parent
commit
34485836b8
  1. 2
      src/storm/storage/geometry/nativepolytopeconversion/QuickHull.cpp
  2. 2
      src/storm/utility/KwekMehlhorn.cpp
  3. 2
      src/storm/utility/constants.cpp

2
src/storm/storage/geometry/nativepolytopeconversion/QuickHull.cpp

@ -34,7 +34,7 @@ namespace storm {
for (uint_fast64_t vertexIndex : vertexIndices){
insidePoint += points[vertexIndex];
}
insidePoint /= storm::utility::convertNumber<ValueType>((uint_fast64_t) vertexIndices.size());
insidePoint /= storm::utility::convertNumber<ValueType>(static_cast<uint_fast64_t>(vertexIndices.size()));
// Create the initial facets from the found vertices.
std::vector<Facet> facets = computeInitialFacets(points, vertexIndices, insidePoint);

2
src/storm/utility/KwekMehlhorn.cpp

@ -31,7 +31,7 @@ namespace storm {
std::pair<typename NumberTraits<RationalType>::IntegerType, typename NumberTraits<RationalType>::IntegerType> truncateToRational(ImpreciseType const& value, uint64_t precision) {
typedef typename NumberTraits<RationalType>::IntegerType IntegerType;
IntegerType powerOfTen = storm::utility::pow(storm::utility::convertNumber<IntegerType>(10ull), precision);
IntegerType powerOfTen = storm::utility::pow(storm::utility::convertNumber<IntegerType>(static_cast<uint64_t>(10)), precision);
IntegerType truncated = storm::utility::trunc<RationalType>(value * powerOfTen);
return std::make_pair(truncated, powerOfTen);
}

2
src/storm/utility/constants.cpp

@ -497,7 +497,7 @@ namespace storm {
}
template<>
GmpRationalNumber convertNumber(unsigned long long const& number){
GmpRationalNumber convertNumber(uint_fast64_t const& number){
STORM_LOG_ASSERT(static_cast<carl::uint>(number) == number, "Rationalizing failed, because the number is too large.");
return carl::rationalize<GmpRationalNumber>(static_cast<carl::uint>(number));
}

Loading…
Cancel
Save