@ -141,6 +141,7 @@ namespace storm {
storm::storage::sparse::ModelComponents<ValueType> components(std::move(modelComponents.transitionMatrix), std::move(modelComponents.stateLabeling));
components.exitRates = std::move(modelComponents.exitRates);
if (deterministic) {
components.transitionMatrix.makeRowGroupingTrivial();
model = std::make_shared<storm::models::sparse::Ctmc<ValueType>>(std::move(components));
} else {
components.markovianStates = std::move(modelComponents.markovianStates);
@ -1472,6 +1472,16 @@ namespace storm {
return trivialRowGrouping;
}
template<typename ValueType>
void SparseMatrix<ValueType>::makeRowGroupingTrivial() {
if (trivialRowGrouping) {
STORM_LOG_ASSERT(!rowGroupIndices || rowGroupIndices.get() == storm::utility::vector::buildVectorForRange(0, this->getRowGroupCount() + 1), "Row grouping is supposed to be trivial but actually it is not.");
trivialRowGrouping = true;
rowGroupIndices = boost::none;
ValueType SparseMatrix<ValueType>::getRowSum(index_type row) const {
ValueType sum = storm::utility::zero<ValueType>();
@ -999,6 +999,12 @@ s * @param insertDiagonalEntries If set to true, the resulting matri
*/
bool hasTrivialRowGrouping() const;
/*!
* Makes the row grouping of this matrix trivial.
* Has no effect when the row grouping is already trivial.
void makeRowGroupingTrivial();
* Returns a copy of the matrix with the chosen internal data type