From 46074aa8bce3bf9b689ecc127001b3ed196ba19e Mon Sep 17 00:00:00 2001 From: TimQu Date: Mon, 11 Dec 2017 16:41:33 +0100 Subject: [PATCH] fixed chain size computation --- src/storm/solver/TopologicalLinearEquationSolver.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/storm/solver/TopologicalLinearEquationSolver.cpp b/src/storm/solver/TopologicalLinearEquationSolver.cpp index 59f0b8006..69a3efe18 100644 --- a/src/storm/solver/TopologicalLinearEquationSolver.cpp +++ b/src/storm/solver/TopologicalLinearEquationSolver.cpp @@ -182,7 +182,10 @@ namespace storm { uint32_t& currentChainSize = chainSizes[currentSccIndex]; for (auto const& row : scc) { for (auto const& entry : this->A->getRow(row)) { - currentChainSize = std::max(currentChainSize, chainSizes[sccIndices[entry.getColumn()]] + 1); + auto const& successorSCC = sccIndices[entry.getColumn()]; + if (successorSCC != currentSccIndex) { + currentChainSize = std::max(currentChainSize, chainSizes[successorSCC] + 1); + } } } longestChainSize = std::max(longestChainSize, currentChainSize);