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

This solver can be used on equation systems that are known to be acyclic. More...

#include <AcyclicLinearEquationSolver.h>

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

Public Member Functions

 AcyclicLinearEquationSolver ()
 AcyclicLinearEquationSolver (storm::storage::SparseMatrix< ValueType > const &A)
 AcyclicLinearEquationSolver (storm::storage::SparseMatrix< ValueType > &&A)
virtual void setMatrix (storm::storage::SparseMatrix< ValueType > const &A) override
virtual void setMatrix (storm::storage::SparseMatrix< ValueType > &&A) override
virtual ~AcyclicLinearEquationSolver ()
virtual void clearCache () const override
virtual LinearEquationSolverProblemFormat getEquationProblemFormat (storm::Environment const &env) const override
 Retrieves the format in which this solver expects to solve equations.
virtual LinearEquationSolverRequirements getRequirements (Environment const &env) const override
 Retrieves the requirements of the solver under the current settings.
Public Member Functions inherited from storm::solver::LinearEquationSolver< ValueType >
 LinearEquationSolver ()
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.
void setCachingEnabled (bool value) const
 Sets whether some of the generated data during solver calls should be cached.
bool isCachingEnabled () const
 Retrieves whether some of the generated data during solver calls should be cached.
Public Member Functions inherited from storm::solver::AbstractEquationSolver< ValueType >
 AbstractEquationSolver ()
void setShowProgress (bool verbose, uint64_t delay=5)
 Configures whether this solver should show progress during iterative solving.
void setTerminationCondition (std::unique_ptr< TerminationCondition< ValueType > > terminationCondition)
 Sets a custom termination condition that is used together with the regular termination condition of the solver.
void resetTerminationCondition ()
 Removes a previously set custom termination condition.
bool hasCustomTerminationCondition () const
 Retrieves whether a custom termination condition has been set.
bool terminateNow (std::vector< ValueType > const &values, SolverGuarantee const &guarantee) const
 Checks whether the solver can terminate wrt.
bool hasRelevantValues () const
 Retrieves whether this solver has particularly relevant values.
storm::storage::BitVector const & getRelevantValues () const
 Retrieves the relevant values (if there are any).
boost::optional< storm::storage::BitVector > const & getOptionalRelevantValues () const
void setRelevantValues (storm::storage::BitVector &&valuesOfInterest)
 Sets the relevant values.
void clearRelevantValues ()
 Removes the values of interest (if there were any).
bool hasLowerBound (BoundType const &type=BoundType::Any) const
 Retrieves whether this solver has a lower bound.
bool hasUpperBound (BoundType const &type=BoundType::Any) const
 Retrieves whether this solver has an upper bound.
void setLowerBound (ValueType const &value)
 Sets a lower bound for the solution that can potentially be used by the solver.
void setUpperBound (ValueType const &value)
 Sets an upper bound for the solution that can potentially be used by the solver.
void setBounds (ValueType const &lower, ValueType const &upper)
 Sets bounds for the solution that can potentially be used by the solver.
ValueType const & getLowerBound () const
 Retrieves the lower bound (if there is any).
ValueType const & getUpperBound () const
 Retrieves the upper bound (if there is any).
std::vector< ValueType > const & getLowerBounds () const
 Retrieves a vector containing the lower bounds (if there are any).
std::vector< ValueType > const & getUpperBounds () const
 Retrieves a vector containing the upper bounds (if there are any).
void setLowerBounds (std::vector< ValueType > const &values)
 Sets lower bounds for the solution that can potentially be used by the solver.
void setUpperBounds (std::vector< ValueType > const &values)
 Sets upper bounds for the solution that can potentially be used by the solver.
void setBoundsFromOtherSolver (AbstractEquationSolver< ValueType > const &other)
void clearBounds ()
 Removes all specified solution bounds.
bool hasSolutionLowerBounds () const
 Retrieves whether the last call to this solver computed a sound lower resp.
bool hasSolutionUpperBounds () const
bool hasExactSolutionBounds () const
 Retrieves whether the bounds computed by the last call to this solver coincide.
std::vector< ValueType > const & getSolutionLowerBounds () const
 Retrieves sound bounds on the solution that the last call to this solver computed.
std::vector< ValueType > const & getSolutionUpperBounds () const
SolutionBounds< ValueType > const & getSolutionBounds () const
 Retrieves both bounds at once, either of which may be unset.
bool isShowProgressSet () const
 Retrieves whether progress is to be shown.
uint64_t getShowProgressDelay () const
 Retrieves the delay between progress emissions.
void startMeasureProgress (uint64_t startingIteration=0) const
 Starts to measure progress.
void showProgressIterative (uint64_t iterations, boost::optional< uint64_t > const &bound=boost::none) const
 Shows progress if this solver is asked to do so.

Protected Member Functions

virtual bool internalSolveEquations (storm::Environment const &env, std::vector< ValueType > &x, std::vector< ValueType > const &b) const override
Protected Member Functions inherited from storm::solver::AbstractEquationSolver< ValueType >
TerminationCondition< ValueType > const & getTerminationCondition () const
 Retrieves the custom termination condition (if any was set).
std::unique_ptr< TerminationCondition< ValueType > > const & getTerminationConditionPointer () const
void setSolutionBounds (SolutionBounds< ValueType > bounds) const
 Stores sound bounds on the solution that were obtained while solving.
void setSolutionBoundsExact (std::vector< ValueType > const &x) const
 Reports the given solution as an exact one, i.e.
void finalizeSolutionBounds (std::vector< ValueType > const &x) const
 Settles the bounds to report once solving is over: the ones handed to this solver beforehand are folded into the ones it computed itself, and both are widened until they enclose the solution that is handed back.
void clearSolutionBounds () const
 Discards any bounds on the solution obtained by a previous call.
void setSolutionBoundsFromPrecision (std::vector< ValueType > const &x, ValueType const &precision, bool relative) const
 Turns a precision that the solving procedure is known to have achieved into sound bounds on the solution, i.e.
void createUpperBoundsVector (std::vector< ValueType > &upperBoundsVector) const
void createLowerBoundsVector (std::vector< ValueType > &lowerBoundsVector) const
void reportStatus (SolverStatus status, boost::optional< uint64_t > const &iterations=boost::none) const
 Report the current status of the solver.
SolverStatus updateStatus (SolverStatus status, std::vector< ValueType > const &x, SolverGuarantee const &guarantee, uint64_t iterations, uint64_t maximalNumberOfIterations) const
 Update the status of the solver with respect to convergence, early termination, abortion, etc.

Additional Inherited Members

Public Types inherited from storm::solver::AbstractEquationSolver< ValueType >
enum  BoundType
Protected Attributes inherited from storm::solver::LinearEquationSolver< ValueType >
std::unique_ptr< std::vector< ValueType > > cachedRowVector
Protected Attributes inherited from storm::solver::AbstractEquationSolver< ValueType >
std::unique_ptr< TerminationCondition< ValueType > > terminationCondition
boost::optional< storm::storage::BitVector > relevantValues
boost::optional< ValueType > lowerBound
boost::optional< ValueType > upperBound
boost::optional< std::vector< ValueType > > lowerBounds
boost::optional< std::vector< ValueType > > upperBounds

Detailed Description

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

This solver can be used on equation systems that are known to be acyclic.

It is optimized for solving many instances of the equation system with the same underlying matrix.

Definition at line 20 of file AcyclicLinearEquationSolver.h.

Constructor & Destructor Documentation

◆ AcyclicLinearEquationSolver() [1/3]

template<typename ValueType>
storm::solver::AcyclicLinearEquationSolver< ValueType >::AcyclicLinearEquationSolver ( )

Definition at line 11 of file AcyclicLinearEquationSolver.cpp.

◆ AcyclicLinearEquationSolver() [2/3]

template<typename ValueType>
storm::solver::AcyclicLinearEquationSolver< ValueType >::AcyclicLinearEquationSolver ( storm::storage::SparseMatrix< ValueType > const & A)

Definition at line 16 of file AcyclicLinearEquationSolver.cpp.

◆ AcyclicLinearEquationSolver() [3/3]

template<typename ValueType>
storm::solver::AcyclicLinearEquationSolver< ValueType >::AcyclicLinearEquationSolver ( storm::storage::SparseMatrix< ValueType > && A)

Definition at line 21 of file AcyclicLinearEquationSolver.cpp.

◆ ~AcyclicLinearEquationSolver()

template<typename ValueType>
virtual storm::solver::AcyclicLinearEquationSolver< ValueType >::~AcyclicLinearEquationSolver ( )
inlinevirtual

Definition at line 29 of file AcyclicLinearEquationSolver.h.

Member Function Documentation

◆ clearCache()

template<typename ValueType>
void storm::solver::AcyclicLinearEquationSolver< ValueType >::clearCache ( ) const
overridevirtual

◆ getEquationProblemFormat()

template<typename ValueType>
LinearEquationSolverProblemFormat storm::solver::AcyclicLinearEquationSolver< ValueType >::getEquationProblemFormat ( storm::Environment const & env) const
overridevirtual

Retrieves the format in which this solver expects to solve equations.

If the solver expects the equation system format, it solves Ax = b. If it it expects a fixed point format, it solves Ax + b = x.

Implements storm::solver::LinearEquationSolver< ValueType >.

Definition at line 105 of file AcyclicLinearEquationSolver.cpp.

◆ getRequirements()

template<typename ValueType>
LinearEquationSolverRequirements storm::solver::AcyclicLinearEquationSolver< ValueType >::getRequirements ( Environment const & env) const
overridevirtual

Retrieves the requirements of the solver under the current settings.

Note that these requirements only apply to solving linear equations and not to the matrix vector multiplications.

Reimplemented from storm::solver::LinearEquationSolver< ValueType >.

Definition at line 110 of file AcyclicLinearEquationSolver.cpp.

◆ internalSolveEquations()

template<typename ValueType>
bool storm::solver::AcyclicLinearEquationSolver< ValueType >::internalSolveEquations ( storm::Environment const & env,
std::vector< ValueType > & x,
std::vector< ValueType > const & b ) const
overrideprotectedvirtual

◆ setMatrix() [1/2]

template<typename ValueType>
void storm::solver::AcyclicLinearEquationSolver< ValueType >::setMatrix ( storm::storage::SparseMatrix< ValueType > && A)
overridevirtual

◆ setMatrix() [2/2]

template<typename ValueType>
void storm::solver::AcyclicLinearEquationSolver< ValueType >::setMatrix ( storm::storage::SparseMatrix< ValueType > const & A)
overridevirtual

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