1#ifndef STORM_SOLVER_LINEAREQUATIONSOLVER_H_
2#define STORM_SOLVER_LINEAREQUATIONSOLVER_H_
26template<
class ValueType>
89 virtual uint64_t getMatrixRowCount()
const = 0;
94 virtual uint64_t getMatrixColumnCount()
const = 0;
97 mutable bool cachingEnabled;
103enum class EquationSolverType;
105template<
typename ValueType>
130 virtual std::unique_ptr<LinearEquationSolver<ValueType>>
create(
Environment const& env)
const = 0;
135 virtual std::unique_ptr<LinearEquationSolverFactory<ValueType>>
clone()
const = 0;
149template<
typename ValueType>
156 virtual std::unique_ptr<LinearEquationSolver<ValueType>>
create(
Environment const& env)
const override;
158 virtual std::unique_ptr<LinearEquationSolverFactory<ValueType>>
clone()
const override;
virtual std::unique_ptr< LinearEquationSolver< ValueType > > create(Environment const &env) const override
Creates an equation solver with the current settings, but without a matrix.
GeneralLinearEquationSolverFactory()
virtual std::unique_ptr< LinearEquationSolverFactory< ValueType > > clone() const override
Creates a copy of this factory.
std::unique_ptr< LinearEquationSolver< ValueType > > create(Environment const &env, storm::storage::SparseMatrix< ValueType > const &matrix) const
Creates a new linear equation solver instance with the given matrix.
LinearEquationSolverRequirements getRequirements(Environment const &env) const
Retrieves the requirements of the solver if it was created with the current settings.
virtual std::unique_ptr< LinearEquationSolverFactory< ValueType > > clone() const =0
Creates a copy of this factory.
virtual std::unique_ptr< LinearEquationSolver< ValueType > > create(Environment const &env) const =0
Creates an equation solver with the current settings, but without a matrix.
virtual ~LinearEquationSolverFactory()=default
virtual LinearEquationSolverProblemFormat getEquationProblemFormat(Environment const &env) const
Retrieves the problem format that the solver expects if it was created with the current settings.
An interface that represents an abstract linear equation solver.
virtual void setMatrix(storm::storage::SparseMatrix< ValueType > const &A)=0
virtual void setMatrix(storm::storage::SparseMatrix< ValueType > &&A)=0
void setCachingEnabled(bool value) const
Sets whether some of the generated data during solver calls should be cached.
virtual ~LinearEquationSolver()
bool solveEquations(Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const &b) const
If the solver expects the equation system format, it solves Ax = b.
virtual void clearCache() const
bool isCachingEnabled() const
Retrieves whether some of the generated data during solver calls should be cached.
virtual LinearEquationSolverProblemFormat getEquationProblemFormat(Environment const &env) const =0
Retrieves the format in which this solver expects to solve equations.
virtual bool internalSolveEquations(Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const &b) const =0
std::unique_ptr< std::vector< ValueType > > cachedRowVector
virtual LinearEquationSolverRequirements getRequirements(Environment const &env) const
Retrieves the requirements of the solver under the current settings.
A class that holds a possibly non-square matrix in the compressed row storage format.
LinearEquationSolverProblemFormat