|
@ -1571,7 +1571,7 @@ namespace storm { |
|
|
typename SparseMatrix<ValueType>::index_type SparseMatrix<ValueType>::getNonconstantRowGroupCount() const { |
|
|
typename SparseMatrix<ValueType>::index_type SparseMatrix<ValueType>::getNonconstantRowGroupCount() const { |
|
|
index_type nonConstRowGroups = 0; |
|
|
index_type nonConstRowGroups = 0; |
|
|
for (index_type rowGroup=0; rowGroup < this->getRowGroupCount(); ++rowGroup) { |
|
|
for (index_type rowGroup=0; rowGroup < this->getRowGroupCount(); ++rowGroup) { |
|
|
for( auto const& entry : this->getRowGroup(rowGroup)){ |
|
|
|
|
|
|
|
|
for (auto const& entry : this->getRowGroup(rowGroup)){ |
|
|
if(!storm::utility::isConstant(entry.getValue())){ |
|
|
if(!storm::utility::isConstant(entry.getValue())){ |
|
|
++nonConstRowGroups; |
|
|
++nonConstRowGroups; |
|
|
break; |
|
|
break; |
|
@ -1584,11 +1584,18 @@ namespace storm { |
|
|
template<typename ValueType> |
|
|
template<typename ValueType> |
|
|
bool SparseMatrix<ValueType>::isProbabilistic() const { |
|
|
bool SparseMatrix<ValueType>::isProbabilistic() const { |
|
|
storm::utility::ConstantsComparator<ValueType> comparator; |
|
|
storm::utility::ConstantsComparator<ValueType> comparator; |
|
|
for(index_type row = 0; row < this->rowCount; ++row) { |
|
|
|
|
|
|
|
|
for (index_type row = 0; row < this->rowCount; ++row) { |
|
|
if(!comparator.isOne(getRowSum(row))) { |
|
|
if(!comparator.isOne(getRowSum(row))) { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
for (auto const& entry : *this) { |
|
|
|
|
|
if (comparator.isConstant(entry.getValue())) { |
|
|
|
|
|
if (comparator.isLess(entry.getValue(), storm::utility::zero<ValueType>())) { |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|