Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
GmmxxLinearEquationSolver.h
Go to the documentation of this file.
1#pragma once
2
3#include <ostream>
4
6
9
10namespace storm {
11namespace solver {
12
16template<typename ValueType>
18 public:
22
23 virtual void setMatrix(storm::storage::SparseMatrix<ValueType> const& A) override;
24 virtual void setMatrix(storm::storage::SparseMatrix<ValueType>&& A) override;
25
27
28 virtual void clearCache() const override;
29
30 protected:
31 virtual bool internalSolveEquations(Environment const& env, std::vector<ValueType>& x, std::vector<ValueType> const& b) const override;
32
33 private:
34 GmmxxLinearEquationSolverMethod getMethod(Environment const& env) const;
35
36 virtual uint64_t getMatrixRowCount() const override;
37 virtual uint64_t getMatrixColumnCount() const override;
38#ifdef STORM_HAVE_GMM
39 // The matrix in gmm++ format.
40 std::unique_ptr<gmm::csr_matrix<ValueType>> gmmxxA;
41
42 // cached data obtained during solving
43 mutable std::unique_ptr<gmm::ilu_precond<gmm::csr_matrix<ValueType>>> iluPreconditioner;
44 mutable std::unique_ptr<gmm::diagonal_precond<gmm::csr_matrix<ValueType>>> diagonalPreconditioner;
45#endif
46};
47
48template<typename ValueType>
50 public:
52
53 virtual std::unique_ptr<storm::solver::LinearEquationSolver<ValueType>> create(Environment const& env) const override;
54
55 virtual std::unique_ptr<LinearEquationSolverFactory<ValueType>> clone() const override;
56};
57
58} // namespace solver
59} // namespace storm
virtual std::unique_ptr< LinearEquationSolverFactory< ValueType > > clone() const override
Creates a copy of this factory.
virtual std::unique_ptr< storm::solver::LinearEquationSolver< ValueType > > create(Environment const &env) const override
Creates an equation solver with the current settings, but without a matrix.
virtual bool internalSolveEquations(Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const &b) const override
virtual void setMatrix(storm::storage::SparseMatrix< ValueType > const &A) override
virtual LinearEquationSolverProblemFormat getEquationProblemFormat(Environment const &env) const override
Retrieves the format in which this solver expects to solve equations.
A class that holds a possibly non-square matrix in the compressed row storage format.