14template<
typename ValueType>
20template<
typename ValueType>
42 virtual void multiply(
Environment const& env, std::vector<ValueType>
const& x, std::vector<ValueType>
const* b, std::vector<ValueType>& result)
const = 0;
70 std::vector<ValueType>& result, std::vector<uint_fast64_t>* choices =
nullptr)
const;
72 std::vector<ValueType>
const& x, std::vector<ValueType>
const* b, std::vector<ValueType>& result,
73 std::vector<uint_fast64_t>* choices =
nullptr)
const = 0;
91 std::vector<uint_fast64_t>* choices =
nullptr,
bool backwards =
true)
const;
93 std::vector<ValueType>& x, std::vector<ValueType>
const* b, std::vector<uint_fast64_t>* choices =
nullptr,
94 bool backwards =
true)
const = 0;
131 virtual void multiplyRow(uint64_t
const& rowIndex, std::vector<ValueType>
const& x, ValueType& value)
const = 0;
141 virtual void multiplyRow2(uint64_t
const& rowIndex, std::vector<ValueType>
const& x1, ValueType& val1, std::vector<ValueType>
const& x2,
142 ValueType& val2)
const;
149template<
typename ValueType>
~MultiplierFactory()=default
std::unique_ptr< Multiplier< ValueType > > create(Environment const &env, storm::storage::SparseMatrix< ValueType > const &matrix)
MultiplierFactory()=default
virtual void clearCache() const
void multiplyAndReduceGaussSeidel(Environment const &env, OptimizationDirection const &dir, std::vector< ValueType > &x, std::vector< ValueType > const *b, std::vector< uint_fast64_t > *choices=nullptr, bool backwards=true) const
Performs a matrix-vector multiplication in gauss-seidel style and then minimizes/maximizes over the r...
void multiplyAndReduce(Environment const &env, OptimizationDirection const &dir, std::vector< ValueType > const &x, std::vector< ValueType > const *b, std::vector< ValueType > &result, std::vector< uint_fast64_t > *choices=nullptr) const
Performs a matrix-vector multiplication x' = A*x + b and then minimizes/maximizes over the row groups...
virtual void multiply(Environment const &env, std::vector< ValueType > const &x, std::vector< ValueType > const *b, std::vector< ValueType > &result) const =0
Performs a matrix-vector multiplication x' = A*x + b.
virtual void multiplyRow(uint64_t const &rowIndex, std::vector< ValueType > const &x, ValueType &value) const =0
Multiplies the row with the given index with x and adds the result to the provided value.
virtual void multiplyRow2(uint64_t const &rowIndex, std::vector< ValueType > const &x1, ValueType &val1, std::vector< ValueType > const &x2, ValueType &val2) const
Multiplies the row with the given index with x1 and x2 and adds the given offset o1 and o2,...
virtual ~Multiplier()=default
virtual void multiplyAndReduceGaussSeidel(Environment const &env, OptimizationDirection const &dir, std::vector< uint64_t > const &rowGroupIndices, std::vector< ValueType > &x, std::vector< ValueType > const *b, std::vector< uint_fast64_t > *choices=nullptr, bool backwards=true) const =0
virtual void multiplyGaussSeidel(Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const *b, bool backwards=true) const =0
Performs a matrix-vector multiplication in gauss-seidel style.
void repeatedMultiply(Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const *b, uint64_t n) const
Performs repeated matrix-vector multiplication, using x[0] = x and x[i + 1] = A*x[i] + b.
std::unique_ptr< std::vector< ValueType > > cachedVector
virtual void multiplyAndReduce(Environment const &env, OptimizationDirection const &dir, std::vector< uint64_t > const &rowGroupIndices, std::vector< ValueType > const &x, std::vector< ValueType > const *b, std::vector< ValueType > &result, std::vector< uint_fast64_t > *choices=nullptr) const =0
void repeatedMultiplyAndReduce(Environment const &env, OptimizationDirection const &dir, std::vector< ValueType > &x, std::vector< ValueType > const *b, uint64_t n) const
Performs repeated matrix-vector multiplication x' = A*x + b and then minimizes/maximizes over the row...
storm::storage::SparseMatrix< ValueType > const & matrix
A class that holds a possibly non-square matrix in the compressed row storage format.