15template<
typename ValueType>
21template<
typename ValueType,
typename SolutionType = ValueType>
43 virtual void multiply(
Environment const& env, std::vector<SolutionType>
const& x, std::vector<ValueType>
const* b,
44 std::vector<SolutionType>& result)
const = 0;
73 std::vector<SolutionType>& result,
UncertaintyResolutionMode const& uncertaintyResolutionMode = UncertaintyResolutionMode::Unset,
74 std::vector<uint_fast64_t>* choices =
nullptr)
const;
76 std::vector<SolutionType>
const& x, std::vector<ValueType>
const* b, std::vector<SolutionType>& result,
78 std::vector<uint_fast64_t>* choices =
nullptr)
const = 0;
96 std::vector<uint_fast64_t>* choices =
nullptr,
bool backwards =
true)
const;
98 std::vector<SolutionType>& x, std::vector<ValueType>
const* b, std::vector<uint_fast64_t>* choices =
nullptr,
99 bool backwards =
true)
const = 0;
143 SolutionType factor)
const;
161 std::vector<ValueType>
const* b, uint64_t n, SolutionType factor,
171template<
typename ValueType,
typename SolutionType = ValueType>
MultiplierFactory()=default
~MultiplierFactory()=default
std::unique_ptr< Multiplier< ValueType, SolutionType > > create(Environment const &env, storm::storage::SparseMatrix< ValueType > const &matrix)
virtual void multiplyAndReduce(Environment const &env, OptimizationDirection const &dir, std::vector< uint64_t > const &rowGroupIndices, std::vector< SolutionType > const &x, std::vector< ValueType > const *b, std::vector< SolutionType > &result, UncertaintyResolutionMode const &uncertaintyResolutionMode=UncertaintyResolutionMode::Unset, std::vector< uint_fast64_t > *choices=nullptr) const =0
Multiplier(storm::storage::SparseMatrix< ValueType > const &matrix)
void repeatedMultiplyWithFactor(Environment const &env, std::vector< SolutionType > &x, std::vector< ValueType > const *b, uint64_t n, SolutionType factor) const
Performs repeated matrix-vector multiplication x' = A*(factor * x) + b.
void multiplyAndReduce(Environment const &env, OptimizationDirection const &dir, std::vector< SolutionType > const &x, std::vector< ValueType > const *b, std::vector< SolutionType > &result, UncertaintyResolutionMode const &uncertaintyResolutionMode=UncertaintyResolutionMode::Unset, 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...
std::unique_ptr< std::vector< SolutionType > > cachedVector
void repeatedMultiply(Environment const &env, std::vector< SolutionType > &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.
virtual ~Multiplier()=default
void repeatedMultiplyAndReduceWithFactor(Environment const &env, OptimizationDirection const &dir, std::vector< SolutionType > &x, std::vector< ValueType > const *b, uint64_t n, SolutionType factor, UncertaintyResolutionMode const &uncertaintyResolutionMode=UncertaintyResolutionMode::Unset) const
Performs repeated matrix-vector multiplication x' = A*(factor * x) + b, minimizes/maximizes over the ...
void multiplyAndReduceGaussSeidel(Environment const &env, OptimizationDirection const &dir, std::vector< SolutionType > &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...
virtual void multiplyGaussSeidel(Environment const &env, std::vector< SolutionType > &x, std::vector< ValueType > const *b, bool backwards=true) const =0
Performs a matrix-vector multiplication in gauss-seidel style.
std::vector< SolutionType > & provideCachedVector(uint64_t size) const
virtual void clearCache() const
storm::storage::SparseMatrix< ValueType > const & matrix
virtual void multiplyAndReduceGaussSeidel(Environment const &env, OptimizationDirection const &dir, std::vector< uint64_t > const &rowGroupIndices, std::vector< SolutionType > &x, std::vector< ValueType > const *b, std::vector< uint_fast64_t > *choices=nullptr, bool backwards=true) const =0
virtual void multiply(Environment const &env, std::vector< SolutionType > const &x, std::vector< ValueType > const *b, std::vector< SolutionType > &result) const =0
Performs a matrix-vector multiplication x' = A*x + b.
void repeatedMultiplyAndReduce(Environment const &env, OptimizationDirection const &dir, std::vector< SolutionType > &x, std::vector< ValueType > const *b, uint64_t n, UncertaintyResolutionMode const &uncertaintyResolutionMode=UncertaintyResolutionMode::Unset) const
Performs repeated matrix-vector multiplication x' = A*x + b and then minimizes/maximizes over the row...
A class that holds a possibly non-square matrix in the compressed row storage format.
UncertaintyResolutionMode