8 changed files with 90 additions and 66 deletions
-
2CMakeLists.txt
-
49src/storage/Block.cpp
-
57src/storage/StateBlock.cpp
-
13src/storage/StateBlock.h
-
15src/storage/StronglyConnectedComponent.h
-
4src/storage/StronglyConnectedComponentDecomposition.cpp
-
3src/storage/StronglyConnectedComponentDecomposition.h
-
13src/storage/sparse/StateType.h
@ -1,49 +0,0 @@ |
|||
#include "src/storage/Block.h"
|
|||
|
|||
namespace storm { |
|||
namespace storage { |
|||
Block::iterator Block::begin() { |
|||
return states.begin(); |
|||
} |
|||
|
|||
Block::const_iterator Block::begin() const { |
|||
return states.begin(); |
|||
} |
|||
|
|||
StronglyConnectedComponent::iterator Block::end() { |
|||
return states.end(); |
|||
} |
|||
|
|||
StronglyConnectedComponent::const_iterator Block::end() const { |
|||
return states.end(); |
|||
} |
|||
|
|||
std::size_t Block::size() const { |
|||
return states.size(); |
|||
} |
|||
|
|||
void Block::insert(value_type const& state) { |
|||
states.insert(state); |
|||
} |
|||
|
|||
void Block::erase(value_type const& state) { |
|||
states.erase(state); |
|||
} |
|||
|
|||
bool Block::containsState(value_type const& state) const { |
|||
return this->states.find(state) != this->states.end(); |
|||
} |
|||
|
|||
std::ostream& operator<<(std::ostream& out, StateBlock const& block) { |
|||
out << "{"; |
|||
for (auto const& element : block) { |
|||
out << element << ", "; |
|||
} |
|||
out << "}"; |
|||
return out; |
|||
} |
|||
|
|||
// Explicitly instantiate template.
|
|||
template Block<>; |
|||
} |
|||
} |
@ -0,0 +1,57 @@ |
|||
#include "src/storage/StateBlock.h"
|
|||
|
|||
namespace storm { |
|||
namespace storage { |
|||
template <typename ContainerType> |
|||
typename StateBlock<ContainerType>::iterator StateBlock<ContainerType>::begin() { |
|||
return states.begin(); |
|||
} |
|||
|
|||
template <typename ContainerType> |
|||
typename StateBlock<ContainerType>::const_iterator StateBlock<ContainerType>::begin() const { |
|||
return states.begin(); |
|||
} |
|||
|
|||
template <typename ContainerType> |
|||
typename StateBlock<ContainerType>::iterator StateBlock<ContainerType>::end() { |
|||
return states.end(); |
|||
} |
|||
|
|||
template <typename ContainerType> |
|||
typename StateBlock<ContainerType>::const_iterator StateBlock<ContainerType>::end() const { |
|||
return states.end(); |
|||
} |
|||
|
|||
template <typename ContainerType> |
|||
std::size_t StateBlock<ContainerType>::size() const { |
|||
return states.size(); |
|||
} |
|||
|
|||
template <typename ContainerType> |
|||
void StateBlock<ContainerType>::insert(value_type const& state) { |
|||
states.insert(state); |
|||
} |
|||
|
|||
template <typename ContainerType> |
|||
void StateBlock<ContainerType>::erase(value_type const& state) { |
|||
states.erase(state); |
|||
} |
|||
|
|||
template <typename ContainerType> |
|||
bool StateBlock<ContainerType>::containsState(value_type const& state) const { |
|||
return this->states.find(state) != this->states.end(); |
|||
} |
|||
|
|||
std::ostream& operator<<(std::ostream& out, FlatSetStateContainer const& block) { |
|||
out << "{"; |
|||
for (auto const& element : block) { |
|||
out << element << ", "; |
|||
} |
|||
out << "}"; |
|||
return out; |
|||
} |
|||
|
|||
// Explicitly instantiate template.
|
|||
template Block<FlatSetStateContainer>; |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
#ifndef STORM_STORAGE_SPARSE_STATETYPE_H_ |
|||
#define STORM_STORAGE_SPARSE_STATETYPE_H_ |
|||
|
|||
namespace storm { |
|||
namespace storage { |
|||
namespace sparse { |
|||
typedef uint_fast64_t state_type; |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
#endif /* STORM_STORAGE_SPARSE_STATETYPE_H_ */ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue