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

#include <ViOperatorMultiplier.h>

Inheritance diagram for storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >:
Collaboration diagram for storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >:

Public Member Functions

 ViOperatorMultiplier (storm::storage::SparseMatrix< ValueType > const &matrix)
 
virtual ~ViOperatorMultiplier ()=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 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.
 

Additional Inherited Members

- Protected Member Functions inherited from storm::solver::Multiplier< ValueType >
std::vector< ValueType > & provideCachedVector (uint64_t size) const
 
- 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, bool TrivialRowGrouping>
class storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >

Definition at line 18 of file ViOperatorMultiplier.h.

Constructor & Destructor Documentation

◆ ViOperatorMultiplier()

template<typename ValueType , bool TrivialRowGrouping>
storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >::ViOperatorMultiplier ( storm::storage::SparseMatrix< ValueType > const &  matrix)

Definition at line 148 of file ViOperatorMultiplier.cpp.

◆ ~ViOperatorMultiplier()

template<typename ValueType , bool TrivialRowGrouping>
virtual storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >::~ViOperatorMultiplier ( )
virtualdefault

Member Function Documentation

◆ clearCache()

template<typename ValueType , bool TrivialRowGrouping>
void storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >::clearCache ( ) const
overridevirtual

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

Definition at line 285 of file ViOperatorMultiplier.cpp.

◆ multiply()

template<typename ValueType , bool TrivialRowGrouping>
void storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >::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 177 of file ViOperatorMultiplier.cpp.

◆ multiplyAndReduce()

template<typename ValueType , bool TrivialRowGrouping>
void storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >::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 211 of file ViOperatorMultiplier.cpp.

◆ multiplyAndReduceGaussSeidel()

template<typename ValueType , bool TrivialRowGrouping>
void storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >::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 251 of file ViOperatorMultiplier.cpp.

◆ multiplyGaussSeidel()

template<typename ValueType , bool TrivialRowGrouping>
void storm::solver::ViOperatorMultiplier< ValueType, TrivialRowGrouping >::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 197 of file ViOperatorMultiplier.cpp.


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