Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
GmmxxLinearEquationSolver.h
Go to the documentation of this file.
1#ifndef STORM_SOLVER_GMMXXLINEAREQUATIONSOLVER_H_
2#define STORM_SOLVER_GMMXXLINEAREQUATIONSOLVER_H_
3
4#include <ostream>
5
7
10
11namespace storm {
12namespace solver {
13
17template<typename ValueType>
19 public:
23
24 virtual void setMatrix(storm::storage::SparseMatrix<ValueType> const& A) override;
25 virtual void setMatrix(storm::storage::SparseMatrix<ValueType>&& A) override;
26
28
29 virtual void clearCache() const override;
30
31 protected:
32 virtual bool internalSolveEquations(Environment const& env, std::vector<ValueType>& x, std::vector<ValueType> const& b) const override;
33
34 private:
35 GmmxxLinearEquationSolverMethod getMethod(Environment const& env) const;
36
37 virtual uint64_t getMatrixRowCount() const override;
38 virtual uint64_t getMatrixColumnCount() const override;
39
40 // The matrix in gmm++ format.
41 std::unique_ptr<gmm::csr_matrix<ValueType>> gmmxxA;
42
43 // cached data obtained during solving
44 mutable std::unique_ptr<gmm::ilu_precond<gmm::csr_matrix<ValueType>>> iluPreconditioner;
45 mutable std::unique_ptr<gmm::diagonal_precond<gmm::csr_matrix<ValueType>>> diagonalPreconditioner;
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
60
61#endif /* STORM_SOLVER_GMMXXLINEAREQUATIONSOLVER_H_ */
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.
A class that uses the gmm++ library to implement the LinearEquationSolver interface.
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.
An interface that represents an abstract linear equation solver.
A class that holds a possibly non-square matrix in the compressed row storage format.
LabParser.cpp.
Definition cli.cpp:18