Browse Source

Removed some time measurements and fixed simplify functionality.

Former-commit-id: ece2b344f9
tempestpy_adaptions
dehnert 10 years ago
parent
commit
71ceb3f34b
  1. 4
      src/modelchecker/reachability/SparseSccModelChecker.cpp
  2. 16
      src/utility/ConstantsComparator.cpp
  3. 3
      src/utility/ConstantsComparator.h

4
src/modelchecker/reachability/SparseSccModelChecker.cpp

@ -419,7 +419,7 @@ namespace storm {
break;
}
if (first2->getColumn() < first1->getColumn()) {
*result = storm::utility::simplify(*first2 * multiplyFactor);
*result = storm::utility::simplify(std::move(*first2 * multiplyFactor));
++first2;
} else if (first1->getColumn() < first2->getColumn()) {
*result = *first1;
@ -432,7 +432,7 @@ namespace storm {
}
for (; first2 != last2; ++first2) {
if (first2->getColumn() != state) {
*result = storm::utility::simplify(*first2 * multiplyFactor);
*result = storm::utility::simplify(std::move(*first2 * multiplyFactor));
}
}

16
src/utility/ConstantsComparator.cpp

@ -118,12 +118,24 @@ namespace storm {
}
#endif
template<typename IndexType, typename ValueType>
storm::storage::MatrixEntry<IndexType, ValueType> simplify(storm::storage::MatrixEntry<IndexType, ValueType> matrixEntry) {
simplify(matrixEntry.getValue());
return matrixEntry;
}
template<typename IndexType, typename ValueType>
storm::storage::MatrixEntry<IndexType, ValueType>& simplify(storm::storage::MatrixEntry<IndexType, ValueType>& matrixEntry) {
simplify(matrixEntry.getValue());
return matrixEntry;
}
template<typename IndexType, typename ValueType>
storm::storage::MatrixEntry<IndexType, ValueType>&& simplify(storm::storage::MatrixEntry<IndexType, ValueType>&& matrixEntry) {
simplify(matrixEntry.getValue());
return std::move(matrixEntry);
}
template class ConstantsComparator<double>;
template double one();
@ -132,7 +144,9 @@ namespace storm {
template double simplify(double value);
template storm::storage::MatrixEntry<storm::storage::sparse::state_type, double> simplify(storm::storage::MatrixEntry<storm::storage::sparse::state_type, double> matrixEntry);
template storm::storage::MatrixEntry<storm::storage::sparse::state_type, double>& simplify(storm::storage::MatrixEntry<storm::storage::sparse::state_type, double>& matrixEntry);
template storm::storage::MatrixEntry<storm::storage::sparse::state_type, double>&& simplify(storm::storage::MatrixEntry<storm::storage::sparse::state_type, double>&& matrixEntry);
#ifdef PARAMETRIC_SYSTEMS
template class ConstantsComparator<RationalFunction>;
@ -147,7 +161,9 @@ namespace storm {
template RationalFunction& simplify(RationalFunction& value);
template RationalFunction&& simplify(RationalFunction&& value);
template storm::storage::MatrixEntry<storm::storage::sparse::state_type, RationalFunction> simplify(storm::storage::MatrixEntry<storm::storage::sparse::state_type, RationalFunction> matrixEntry);
template storm::storage::MatrixEntry<storm::storage::sparse::state_type, RationalFunction>& simplify(storm::storage::MatrixEntry<storm::storage::sparse::state_type, RationalFunction>& matrixEntry);
template storm::storage::MatrixEntry<storm::storage::sparse::state_type, RationalFunction>&& simplify(storm::storage::MatrixEntry<storm::storage::sparse::state_type, RationalFunction>&& matrixEntry);
#endif
}
}

3
src/utility/ConstantsComparator.h

@ -98,6 +98,9 @@ namespace storm {
template<typename IndexType, typename ValueType>
storm::storage::MatrixEntry<IndexType, ValueType>& simplify(storm::storage::MatrixEntry<IndexType, ValueType>& matrixEntry);
template<typename IndexType, typename ValueType>
storm::storage::MatrixEntry<IndexType, ValueType>&& simplify(storm::storage::MatrixEntry<IndexType, ValueType>&& matrixEntry);
}
}
Loading…
Cancel
Save