|
|
@ -772,6 +772,23 @@ namespace storm { |
|
|
|
* @return An iterator that points past the end of the last row of the matrix. |
|
|
|
*/ |
|
|
|
iterator end(); |
|
|
|
|
|
|
|
/*! |
|
|
|
* Returns a copy of the matrix with the chosen internal data type |
|
|
|
*/ |
|
|
|
template<typename NewValueType> |
|
|
|
SparseMatrix<NewValueType> toValueType() const { |
|
|
|
std::vector<MatrixEntry<NewValueType>> new_columnsAndValues; |
|
|
|
std::vector<uint_fast64_t> new_rowIndications(rowIndications); |
|
|
|
std::vector<uint_fast64_t> new_rowGroupIndices(rowGroupIndices); |
|
|
|
|
|
|
|
new_columnsAndValues.resize(columnsAndValues.size()); |
|
|
|
for (size_t i = 0, size = columnsAndValues.size(); i < size; ++i) { |
|
|
|
new_columnsAndValues.at(i) = MatrixEntry<NewValueType>(columnsAndValues.at(i).getColumn(), static_cast<NewValueType>(columnsAndValues.at(i).getValue())); |
|
|
|
} |
|
|
|
|
|
|
|
return SparseMatrix<NewValueType>(columnCount, std::move(new_rowIndications), std::move(new_columnsAndValues), std::move(new_rowGroupIndices)); |
|
|
|
} |
|
|
|
|
|
|
|
private: |
|
|
|
/*! |
|
|
|