|
|
@ -525,7 +525,25 @@ namespace storm { |
|
|
|
*it = i; |
|
|
|
} |
|
|
|
auto res = getSubmatrix(rowConstraint, columnConstraint, fakeRowGroupIndices, insertDiagonalElements); |
|
|
|
res.rowGroupIndices = this->rowGroupIndices; |
|
|
|
|
|
|
|
// Create a new row grouping that reflects the new sizes of the row groups.
|
|
|
|
std::vector<uint_fast64_t> newRowGroupIndices; |
|
|
|
newRowGroupIndices.push_back(0); |
|
|
|
auto selectedRowIt = rowConstraint.begin(); |
|
|
|
|
|
|
|
// For this, we need to count how many rows were preserved in every group.
|
|
|
|
for (uint_fast64_t group = 0; group < this->getRowGroupCount(); ++group) { |
|
|
|
uint_fast64_t newRowCount = 0; |
|
|
|
while (*selectedRowIt < this->getRowGroupIndices()[group + 1]) { |
|
|
|
++selectedRowIt; |
|
|
|
++newRowCount; |
|
|
|
} |
|
|
|
if (newRowCount > 0) { |
|
|
|
newRowGroupIndices.push_back(newRowGroupIndices.back() + newRowCount); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
res.rowGroupIndices = newRowGroupIndices; |
|
|
|
return res; |
|
|
|
} |
|
|
|
} |
|
|
@ -641,8 +659,6 @@ namespace storm { |
|
|
|
SparseMatrix<ValueType> res(getSubmatrix(false, rowsToKeep, storm::storage::BitVector(getColumnCount(), true), false)); |
|
|
|
assert(res.getRowCount() == rowsToKeep.getNumberOfSetBits()); |
|
|
|
assert(res.getColumnCount() == getColumnCount()); |
|
|
|
std::cout << getRowGroupCount() << std::endl; |
|
|
|
std::cout << res.getRowGroupCount() << std::endl; |
|
|
|
assert(getRowGroupCount() == res.getRowGroupCount()); |
|
|
|
return res; |
|
|
|
} |