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

#include <NativeMultiplier.h>

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

Public Member Functions

 NativeMultiplier (storm::storage::SparseMatrix< ValueType > const &matrix)
virtual ~NativeMultiplier ()=default
virtual void multiply (Environment const &env, std::vector< ValueType > const &x, std::vector< ValueType > const *b, std::vector< ValueType > &result) const override
virtual void multiplyGaussSeidel (Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const *b, bool backwards=true) const override
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, UncertaintyResolutionMode const &uncertaintyResolutionMode=UncertaintyResolutionMode::Unset, 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
void multiplyRow (uint64_t const &rowIndex, std::vector< ValueType > const &x, ValueType &value) const
 Multiplies the row with the given index with x and adds the result to the provided value.
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.
Public Member Functions inherited from storm::solver::Multiplier< ValueType, SolutionType >
 Multiplier (storm::storage::SparseMatrix< ValueType > const &matrix)
virtual ~Multiplier ()=default
virtual void clearCache () const
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.
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.
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 so that the resulting vector has the size of number of row groups of A.
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
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 row groups so that the resulting vector has the size of number of row groups of A.
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
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.
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 groups so that the resulting vector has the size of number of row groups of A.
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 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 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, SolutionType >
std::vector< SolutionType > & provideCachedVector (uint64_t size) const
Protected Attributes inherited from storm::solver::Multiplier< ValueType, SolutionType >
std::unique_ptr< std::vector< SolutionType > > cachedVector
storm::storage::SparseMatrix< ValueType > const & matrix

Detailed Description

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

Definition at line 16 of file NativeMultiplier.h.

Constructor & Destructor Documentation

◆ NativeMultiplier()

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

Definition at line 16 of file NativeMultiplier.cpp.

◆ ~NativeMultiplier()

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

Member Function Documentation

◆ multiply()

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

Definition at line 21 of file NativeMultiplier.cpp.

◆ multiplyAndReduce()

template<typename ValueType>
void storm::solver::NativeMultiplier< 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,
UncertaintyResolutionMode const & uncertaintyResolutionMode = UncertaintyResolutionMode::Unset,
std::vector< uint_fast64_t > * choices = nullptr ) const
overridevirtual

Definition at line 44 of file NativeMultiplier.cpp.

◆ multiplyAndReduceGaussSeidel()

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

Definition at line 61 of file NativeMultiplier.cpp.

◆ multiplyGaussSeidel()

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

Definition at line 34 of file NativeMultiplier.cpp.

◆ multiplyRow()

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

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 refer to a value in x or in the matrix.

Definition at line 72 of file NativeMultiplier.cpp.

◆ multiplyRow2()

template<typename ValueType>
void storm::solver::NativeMultiplier< ValueType >::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.

Parameters
rowIndexThe index of the considered row
x1The first input vector with which the row is multiplied.
val1The first multiplication result is added to this value. It shall not refer to a value in x or in the matrix.
x2The second input vector with which the row is multiplied.
val2The second multiplication result is added to this value. It shall not refer to a value in x or in the matrix.

Definition at line 79 of file NativeMultiplier.cpp.


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