Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::solver::GmmxxMultiplier< ValueType > Class Template Reference

#include <GmmxxMultiplier.h>

Inheritance diagram for storm::solver::GmmxxMultiplier< ValueType >:
Collaboration diagram for storm::solver::GmmxxMultiplier< ValueType >:

Public Member Functions

 GmmxxMultiplier (storm::storage::SparseMatrix< ValueType > const &matrix)
 
virtual ~GmmxxMultiplier ()=default
 
virtual void multiply (Environment const &env, std::vector< ValueType > const &x, std::vector< ValueType > const *b, std::vector< ValueType > &result) const override
 Performs a matrix-vector multiplication x' = A*x + b.
 
virtual void multiplyGaussSeidel (Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const *b, bool backwards=true) const override
 Performs a matrix-vector multiplication in gauss-seidel style.
 
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 override
 
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 override
 
virtual void multiplyRow (uint64_t const &rowIndex, std::vector< ValueType > const &x, ValueType &value) const override
 Multiplies the row with the given index with x and adds the result to the provided value.
 
virtual void clearCache () const override
 
- Public Member Functions inherited from storm::solver::Multiplier< ValueType >
 Multiplier (storm::storage::SparseMatrix< ValueType > const &matrix)
 
virtual ~Multiplier ()=default
 
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 so that the resulting vector has the size of number of row groups of A.
 
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 row groups so that the resulting vector has the size of number of row groups of A.
 
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.
 
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 groups so that the resulting vector has the size of number of row groups of A.
 
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, respectively.
 

Additional Inherited Members

- Protected Attributes inherited from storm::solver::Multiplier< ValueType >
std::unique_ptr< std::vector< ValueType > > cachedVector
 
storm::storage::SparseMatrix< ValueType > const & matrix
 

Detailed Description

template<typename ValueType>
class storm::solver::GmmxxMultiplier< ValueType >

Definition at line 19 of file GmmxxMultiplier.h.

Constructor & Destructor Documentation

◆ GmmxxMultiplier()

template<typename ValueType >
storm::solver::GmmxxMultiplier< ValueType >::GmmxxMultiplier ( storm::storage::SparseMatrix< ValueType > const &  matrix)

Definition at line 17 of file GmmxxMultiplier.cpp.

◆ ~GmmxxMultiplier()

template<typename ValueType >
virtual storm::solver::GmmxxMultiplier< ValueType >::~GmmxxMultiplier ( )
virtualdefault

Member Function Documentation

◆ clearCache()

template<typename ValueType >
void storm::solver::GmmxxMultiplier< ValueType >::clearCache ( ) const
overridevirtual

Reimplemented from storm::solver::Multiplier< ValueType >.

Definition at line 29 of file GmmxxMultiplier.cpp.

◆ multiply()

template<typename ValueType >
void storm::solver::GmmxxMultiplier< ValueType >::multiply ( Environment const &  env,
std::vector< ValueType > const &  x,
std::vector< ValueType > const *  b,
std::vector< ValueType > &  result 
) const
overridevirtual

Performs a matrix-vector multiplication x' = A*x + b.

Parameters
xThe input vector with which to multiply the matrix. Its length must be equal to the number of columns of A.
bIf non-null, this vector is added after the multiplication. If given, its length must be equal to the number of rows of A.
resultThe target vector into which to write the multiplication result. Its length must be equal to the number of rows of A. Can be the same as the x vector.

Implements storm::solver::Multiplier< ValueType >.

Definition at line 40 of file GmmxxMultiplier.cpp.

◆ multiplyAndReduce()

template<typename ValueType >
void storm::solver::GmmxxMultiplier< ValueType >::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
overridevirtual

Implements storm::solver::Multiplier< ValueType >.

Definition at line 82 of file GmmxxMultiplier.cpp.

◆ multiplyAndReduceGaussSeidel()

template<typename ValueType >
void storm::solver::GmmxxMultiplier< ValueType >::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
overridevirtual

Implements storm::solver::Multiplier< ValueType >.

Definition at line 106 of file GmmxxMultiplier.cpp.

◆ multiplyGaussSeidel()

template<typename ValueType >
void storm::solver::GmmxxMultiplier< ValueType >::multiplyGaussSeidel ( Environment const &  env,
std::vector< ValueType > &  x,
std::vector< ValueType > const *  b,
bool  backwards = true 
) const
overridevirtual

Performs a matrix-vector multiplication in gauss-seidel style.

Parameters
xThe input/output vector with which to multiply the matrix. Its length must be equal to the number of columns of A.
bIf non-null, this vector is added after the multiplication. If given, its length must be equal to the number of rows of A.
backwardsif true, the iterations will be performed beginning from the last row and ending at the first row.

Implements storm::solver::Multiplier< ValueType >.

Definition at line 63 of file GmmxxMultiplier.cpp.

◆ multiplyRow()

template<typename ValueType >
void storm::solver::GmmxxMultiplier< ValueType >::multiplyRow ( uint64_t const &  rowIndex,
std::vector< ValueType > const &  x,
ValueType &  value 
) const
overridevirtual

Multiplies the row with the given index with x and adds the result to the provided value.

Parameters
rowIndexThe index of the considered row
xThe input vector with which the row is multiplied
valueThe multiplication result is added to this value. It shall not reffer to a value in x or in the Matrix.

Implements storm::solver::Multiplier< ValueType >.

Definition at line 114 of file GmmxxMultiplier.cpp.


The documentation for this class was generated from the following files: