Browse Source

Merge branch 'master' into PrctlParser

Changed the C style casts in SparseMatrix.h to static_cast

Conflicts:
	src/storage/SparseMatrix.h
tempestpy_adaptions
Lanchid 12 years ago
parent
commit
cfef571365
  1. 4
      src/storage/SparseMatrix.h
  2. 8
      test/parser/ParseMdpTest.cpp

4
src/storage/SparseMatrix.h

@ -208,7 +208,7 @@ public:
throw storm::exceptions::InvalidArgumentException("Trying to initialize from an Eigen matrix that has more columns than the target matrix."); throw storm::exceptions::InvalidArgumentException("Trying to initialize from an Eigen matrix that has more columns than the target matrix.");
} }
const _Index entryCount = eigenSparseMatrix.nonZeros();
const uint_fast64_t entryCount = eigenSparseMatrix.nonZeros();
nonZeroEntryCount = entryCount; nonZeroEntryCount = entryCount;
lastRow = 0; lastRow = 0;
@ -279,7 +279,7 @@ public:
// Now copy the elements. As the matrix is in ColMajor format, // Now copy the elements. As the matrix is in ColMajor format,
// we need to iterate over the columns to find the next non-zero // we need to iterate over the columns to find the next non-zero
// entry. // entry.
int i = 0;
uint_fast64_t i = 0;
int currentRow = 0; int currentRow = 0;
int currentColumn = 0; int currentColumn = 0;
while (i < entryCount) { while (i < entryCount) {

8
test/parser/ParseMdpTest.cpp

@ -20,10 +20,10 @@ TEST(ParseMdpTest, parseAndOutput) {
std::shared_ptr<storm::models::Mdp<double>> mdp = mdpParser->getMdp(); std::shared_ptr<storm::models::Mdp<double>> mdp = mdpParser->getMdp();
std::shared_ptr<storm::storage::SparseMatrix<double>> matrix = mdp->getTransitionProbabilityMatrix(); std::shared_ptr<storm::storage::SparseMatrix<double>> matrix = mdp->getTransitionProbabilityMatrix();
ASSERT_EQ(mdp->getNumberOfStates(), 3);
ASSERT_EQ(mdp->getNumberOfTransitions(), 11);
ASSERT_EQ(matrix->getRowCount(), 2 * 3);
ASSERT_EQ(matrix->getColumnCount(), 3);
ASSERT_EQ(mdp->getNumberOfStates(), (uint_fast64_t)3);
ASSERT_EQ(mdp->getNumberOfTransitions(), (uint_fast64_t)11);
ASSERT_EQ(matrix->getRowCount(), (uint_fast64_t)2 * 3);
ASSERT_EQ(matrix->getColumnCount(), (uint_fast64_t)3);
delete mdpParser; delete mdpParser;

Loading…
Cancel
Save