Browse Source

Working towards making every (remaining) test work

Former-commit-id: e4560e07f2
main
dehnert 12 years ago
parent
commit
a271e5ce63
  1. 4
      src/models/Dtmc.h
  2. 1
      src/models/Mdp.h
  3. 1
      src/storage/SparseMatrix.cpp

4
src/models/Dtmc.h

@ -322,12 +322,12 @@ private:
for (uint_fast64_t row = 0; row < this->getTransitionMatrix().getRowCount(); ++row) { for (uint_fast64_t row = 0; row < this->getTransitionMatrix().getRowCount(); ++row) {
T sum = this->getTransitionMatrix().getRowSum(row); T sum = this->getTransitionMatrix().getRowSum(row);
if (sum == 0) { if (sum == 0) {
LOG4CPLUS_ERROR(logger, "Row " << row << " has sum 0");
return false; return false;
} }
if (std::abs(sum - 1) > precision) { if (std::abs(sum - 1) > precision) {
LOG4CPLUS_ERROR(logger, "Row " << row << " has sum " << sum);
LOG4CPLUS_ERROR(logger, "Row " << row << " has sum " << sum << ".");
return false; return false;
} }
} }

1
src/models/Mdp.h

@ -216,6 +216,7 @@ private:
double precision = s->getOptionByLongName("precision").getArgument(0).getValueAsDouble(); double precision = s->getOptionByLongName("precision").getArgument(0).getValueAsDouble();
for (uint_fast64_t row = 0; row < this->getTransitionMatrix().getRowCount(); row++) { for (uint_fast64_t row = 0; row < this->getTransitionMatrix().getRowCount(); row++) {
T sum = this->getTransitionMatrix().getRowSum(row); T sum = this->getTransitionMatrix().getRowSum(row);
if (sum == 0) continue; if (sum == 0) continue;
if (std::abs(sum - 1) > precision) { if (std::abs(sum - 1) > precision) {
return false; return false;

1
src/storage/SparseMatrix.cpp

@ -231,6 +231,7 @@ namespace storm {
columnIndications.push_back(column); columnIndications.push_back(column);
columnCount = column + 1; columnCount = column + 1;
rowCount = row + 1; rowCount = row + 1;
++currentEntryCount;
} }
} }

Loading…
Cancel
Save