Browse Source

Try to fix LTO issue by adding virtual destructor

tempestpy_adaptions
Matthias Volk 7 years ago
parent
commit
3beff87636
  1. 17
      src/storm/solver/TopologicalMinMaxLinearEquationSolver.h

17
src/storm/solver/TopologicalMinMaxLinearEquationSolver.h

@ -6,32 +6,35 @@
#include "storm/storage/StronglyConnectedComponentDecomposition.h" #include "storm/storage/StronglyConnectedComponentDecomposition.h"
namespace storm { namespace storm {
class Environment; class Environment;
namespace solver { namespace solver {
template<typename ValueType> template<typename ValueType>
class TopologicalMinMaxLinearEquationSolver : public StandardMinMaxLinearEquationSolver<ValueType> { class TopologicalMinMaxLinearEquationSolver : public StandardMinMaxLinearEquationSolver<ValueType> {
public: public:
TopologicalMinMaxLinearEquationSolver(); TopologicalMinMaxLinearEquationSolver();
TopologicalMinMaxLinearEquationSolver(storm::storage::SparseMatrix<ValueType> const& A); TopologicalMinMaxLinearEquationSolver(storm::storage::SparseMatrix<ValueType> const& A);
TopologicalMinMaxLinearEquationSolver(storm::storage::SparseMatrix<ValueType>&& A); TopologicalMinMaxLinearEquationSolver(storm::storage::SparseMatrix<ValueType>&& A);
virtual ~TopologicalMinMaxLinearEquationSolver() {
}
virtual void clearCache() const override; virtual void clearCache() const override;
virtual MinMaxLinearEquationSolverRequirements getRequirements(Environment const& env, boost::optional<storm::solver::OptimizationDirection> const& direction = boost::none, bool const& hasInitialScheduler = false) const override ; virtual MinMaxLinearEquationSolverRequirements getRequirements(Environment const& env, boost::optional<storm::solver::OptimizationDirection> const& direction = boost::none, bool const& hasInitialScheduler = false) const override ;
protected: protected:
virtual bool internalSolveEquations(storm::Environment const& env, OptimizationDirection d, std::vector<ValueType>& x, std::vector<ValueType> const& b) const override; virtual bool internalSolveEquations(storm::Environment const& env, OptimizationDirection d, std::vector<ValueType>& x, std::vector<ValueType> const& b) const override;
private: private:
storm::Environment getEnvironmentForUnderlyingSolver(storm::Environment const& env, bool adaptPrecision = false) const; storm::Environment getEnvironmentForUnderlyingSolver(storm::Environment const& env, bool adaptPrecision = false) const;
// Creates an SCC decomposition and sorts the SCCs according to a topological sort. // Creates an SCC decomposition and sorts the SCCs according to a topological sort.
void createSortedSccDecomposition(bool needLongestChainSize) const; void createSortedSccDecomposition(bool needLongestChainSize) const;
// Solves the SCC with the given index // Solves the SCC with the given index
// ... for the case that the SCC is trivial // ... for the case that the SCC is trivial
bool solveTrivialScc(uint64_t const& sccState, OptimizationDirection d, std::vector<ValueType>& globalX, std::vector<ValueType> const& globalB) const; bool solveTrivialScc(uint64_t const& sccState, OptimizationDirection d, std::vector<ValueType>& globalX, std::vector<ValueType> const& globalB) const;

Loading…
Cancel
Save