Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
EliminationLinearEquationSolver.h
Go to the documentation of this file.
1#ifndef STORM_SOLVER_ELIMINATIONLINEAREQUATIONSOLVER_H_
2#define STORM_SOLVER_ELIMINATIONLINEAREQUATIONSOLVER_H_
3
5
6namespace storm {
7namespace solver {
8
12template<typename ValueType>
14 public:
18
19 virtual void setMatrix(storm::storage::SparseMatrix<ValueType> const& A) override;
20 virtual void setMatrix(storm::storage::SparseMatrix<ValueType>&& A) override;
21
23
24 protected:
25 virtual bool internalSolveEquations(Environment const& env, std::vector<ValueType>& x, std::vector<ValueType> const& b) const override;
26
27 private:
28 virtual uint64_t getMatrixRowCount() const override;
29 virtual uint64_t getMatrixColumnCount() const override;
30
31 // If the solver takes posession of the matrix, we store the moved matrix in this member, so it gets deleted
32 // when the solver is destructed.
33 std::unique_ptr<storm::storage::SparseMatrix<ValueType>> localA;
34
35 // A pointer to the original sparse matrix given to this solver. If the solver takes posession of the matrix
36 // the pointer refers to localA.
38};
39
40template<typename ValueType>
42 public:
44
45 virtual std::unique_ptr<storm::solver::LinearEquationSolver<ValueType>> create(Environment const& env) const override;
46
47 virtual std::unique_ptr<LinearEquationSolverFactory<ValueType>> clone() const override;
48};
49} // namespace solver
50} // namespace storm
51
52#endif /* STORM_SOLVER_ELIMINATIONLINEAREQUATIONSOLVER_H_ */
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 std::unique_ptr< LinearEquationSolverFactory< ValueType > > clone() const override
Creates a copy of this factory.
A class that uses gaussian elimination to implement the LinearEquationSolver interface.
virtual LinearEquationSolverProblemFormat getEquationProblemFormat(Environment const &env) const override
Retrieves the format in which this solver expects to solve equations.
virtual void setMatrix(storm::storage::SparseMatrix< ValueType > const &A) override
virtual bool internalSolveEquations(Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const &b) const override
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