52 STORM_LOG_ASSERT(x.size() == this->A->getRowGroupCount(),
"Provided x-vector has invalid size.");
53 STORM_LOG_ASSERT(b.size() == this->A->getRowCount(),
"Provided b-vector has invalid size.");
66 auxiliaryRowVector = std::vector<ValueType>(this->A->getRowCount());
67 auxiliaryRowVector2 = std::vector<ValueType>(this->A->getRowCount());
70 std::vector<ValueType>* xPtr = &x;
71 std::vector<ValueType>
const* bPtr = &b;
73 STORM_LOG_ASSERT(rowOrdering->size() == b.size(),
"b-vector has unexpected size.");
74 auxiliaryRowVector->resize(b.size());
76 for (
auto const& bFactor : bFactors) {
77 (*auxiliaryRowVector)[bFactor.first] *= bFactor.second;
79 bPtr = &auxiliaryRowVector.get();
80 xPtr = &auxiliaryRowVector2.get();
83 this->multiplier->multiplyGaussSeidel(env, *xPtr, bPtr,
true);
86 for (uint64_t newRow = 0; newRow < x.size(); ++newRow) {
87 x[(*rowOrdering)[newRow]] = (*xPtr)[newRow];
91 if (!this->isCachingEnabled()) {
storm::storage::SparseMatrix< ValueType > createReorderedMatrix(storm::storage::SparseMatrix< ValueType > const &matrix, std::vector< uint64_t > const &newToOrigIndexMap, std::vector< std::pair< uint64_t, ValueType > > &bFactors)
reorders the row group such that the i'th row of the new matrix corresponds to the order[i]'th row of...
void selectVectorValues(std::vector< T > &vector, storm::storage::BitVector const &positions, std::vector< T > const &values)
Selects the elements from a vector at the specified positions and writes them consecutively into anot...