Browse Source

Stored iterators in bisimulation rather than const_iterators because of gcc. -.-

Former-commit-id: c26147ae60
tempestpy_adaptions
dehnert 10 years ago
parent
commit
d64279bb77
  1. 8
      src/storage/DeterministicModelStrongBisimulationDecomposition.cpp
  2. 11
      src/storage/DeterministicModelStrongBisimulationDecomposition.h

8
src/storage/DeterministicModelStrongBisimulationDecomposition.cpp

@ -84,22 +84,22 @@ namespace storm {
} }
template<typename ValueType> template<typename ValueType>
void DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::setIterator(const_iterator it) {
void DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::setIterator(iterator it) {
this->selfIt = it; this->selfIt = it;
} }
template<typename ValueType> template<typename ValueType>
typename DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::const_iterator DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::getIterator() const {
typename DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::iterator DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::getIterator() const {
return this->selfIt; return this->selfIt;
} }
template<typename ValueType> template<typename ValueType>
typename DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::const_iterator DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::getNextIterator() const {
typename DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::iterator DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::getNextIterator() const {
return this->getNextBlock().getIterator(); return this->getNextBlock().getIterator();
} }
template<typename ValueType> template<typename ValueType>
typename DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::const_iterator DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::getPreviousIterator() const {
typename DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::iterator DeterministicModelStrongBisimulationDecomposition<ValueType>::Block::getPreviousIterator() const {
return this->getPreviousBlock().getIterator(); return this->getPreviousBlock().getIterator();
} }

11
src/storage/DeterministicModelStrongBisimulationDecomposition.h

@ -73,6 +73,7 @@ namespace storm {
class Block { class Block {
public: public:
typedef typename std::list<Block>::iterator iterator;
typedef typename std::list<Block>::const_iterator const_iterator; typedef typename std::list<Block>::const_iterator const_iterator;
Block(storm::storage::sparse::state_type begin, storm::storage::sparse::state_type end, Block* prev, Block* next, std::shared_ptr<std::string> const& label = nullptr); Block(storm::storage::sparse::state_type begin, storm::storage::sparse::state_type end, Block* prev, Block* next, std::shared_ptr<std::string> const& label = nullptr);
@ -102,16 +103,16 @@ namespace storm {
storm::storage::sparse::state_type getOriginalBegin() const; storm::storage::sparse::state_type getOriginalBegin() const;
// Returns the iterator the block in the list of overall blocks. // Returns the iterator the block in the list of overall blocks.
const_iterator getIterator() const;
iterator getIterator() const;
// Returns the iterator the block in the list of overall blocks. // Returns the iterator the block in the list of overall blocks.
void setIterator(const_iterator it);
void setIterator(iterator it);
// Returns the iterator the next block in the list of overall blocks if it exists. // Returns the iterator the next block in the list of overall blocks if it exists.
const_iterator getNextIterator() const;
iterator getNextIterator() const;
// Returns the iterator the next block in the list of overall blocks if it exists. // Returns the iterator the next block in the list of overall blocks if it exists.
const_iterator getPreviousIterator() const;
iterator getPreviousIterator() const;
// Gets the next block (if there is one). // Gets the next block (if there is one).
Block& getNextBlock(); Block& getNextBlock();
@ -194,7 +195,7 @@ namespace storm {
private: private:
// An iterator to itself. This is needed to conveniently insert elements in the overall list of blocks // An iterator to itself. This is needed to conveniently insert elements in the overall list of blocks
// kept by the partition. // kept by the partition.
const_iterator selfIt;
iterator selfIt;
// Pointers to the next and previous block. // Pointers to the next and previous block.
Block* next; Block* next;

Loading…
Cancel
Save