Browse Source

Figured out how to explicitly instantiate templates.

But got bitten by std::vector<bool> as it is specialized and uses bitsets (i.e. integers) internally.
Less memory but at the cost of 'oh, sorry std::vector<bool> does not return a bool&'.
That again seems to be a problem for the SparseMatrix<bool> instatiation since for instance getValue returns a T&.
On the one hand I don't quite know why this was never an issue before and on the other hand it prevents successful compilation.
So there are different ways to settle this:
- Specialize SparseMatix for bool -> possibly lots of code, but might be the best solution
- Write a wrapper for std::vector that uses chars instead of booleans
- Dont't use SparseMatrix<bool>

Next up: Figure out the best solution for this and implement it.


Former-commit-id: 83b9cfd06e
tempestpy_adaptions
masawei 11 years ago
parent
commit
c30d6d307e
  1. 1040
      src/storage/SparseMatrix.cpp
  2. 950
      src/storage/SparseMatrix.h
  3. 3
      src/storage/StronglyConnectedComponentDecomposition.h
  4. 2
      src/storm.cpp

1040
src/storage/SparseMatrix.cpp
File diff suppressed because it is too large
View File

950
src/storage/SparseMatrix.h
File diff suppressed because it is too large
View File

3
src/storage/StronglyConnectedComponentDecomposition.h

@ -1,10 +1,11 @@
#ifndef STORM_STORAGE_STRONGLYCONNECTEDCOMPONENTDECOMPOSITION_H_
#define STORM_STORAGE_STRONGLYCONNECTEDCOMPONENTDECOMPOSITION_H_
#include "src/storage/SparseMatrix.h"
#include "src/storage/Decomposition.h"
#include "src/storage/VectorSet.h"
#include "src/storage/BitVector.h"
#include "src/storage/SparseMatrix.h"
namespace storm {
namespace models {

2
src/storm.cpp

@ -21,9 +21,9 @@
#include <vector>
#include "storm-config.h"
#include "src/storage/SparseMatrix.h"
#include "src/models/Dtmc.h"
#include "src/models/MarkovAutomaton.h"
#include "src/storage/SparseMatrix.h"
#include "src/models/AtomicPropositionsLabeling.h"
#include "src/modelchecker/prctl/SparseDtmcPrctlModelChecker.h"
#include "src/modelchecker/prctl/SparseMdpPrctlModelChecker.h"

Loading…
Cancel
Save