12template<
typename BlockType>
17template<
typename BlockType>
22template<
typename BlockType>
24 this->blocks = other.
blocks;
28template<
typename BlockType>
33template<
typename BlockType>
35 this->blocks = std::move(other.blocks);
39template<
typename BlockType>
44template<
typename BlockType>
46 return blocks.empty();
49template<
typename BlockType>
51 return blocks.begin();
54template<
typename BlockType>
59template<
typename BlockType>
61 return blocks.begin();
64template<
typename BlockType>
69template<
typename BlockType>
71 return blocks.at(index);
74template<
typename BlockType>
76 return blocks.at(index);
79template<
typename BlockType>
84template<
typename BlockType>
89template<
typename BlockType>
90template<
typename ValueType>
95 for (uint_fast64_t
i = 0;
i < this->size(); ++
i) {
96 for (
auto state : this->getBlock(
i)) {
97 stateToBlockMap[state] =
i;
104 for (uint_fast64_t currentBlockIndex = 0; currentBlockIndex < this->size(); ++currentBlockIndex) {
106 block_type const& block = this->getBlock(currentBlockIndex);
110 for (
auto state : block) {
111 for (
auto const& transitionEntry : matrix.getRowGroup(state)) {
112 uint_fast64_t targetBlock = stateToBlockMap[transitionEntry.getColumn()];
115 if (targetBlock != currentBlockIndex) {
116 allTargetBlocks.insert(targetBlock);
122 for (
auto const& targetBlock : allTargetBlocks) {
123 dependencyGraphBuilder.addNextValue(currentBlockIndex, targetBlock, storm::utility::one<ValueType>());
127 return dependencyGraphBuilder.build();
130template<
typename BlockType>
133 if (decomposition.
size() > 0) {
134 for (uint_fast64_t blockIndex = 0; blockIndex < decomposition.
size() - 1; ++blockIndex) {
135 out << decomposition.
blocks[blockIndex] <<
", ";
137 out << decomposition.
blocks.back();
This class represents the decomposition of a model into blocks which are of the template type.
std::vector< block_type >::iterator iterator
Decomposition & operator=(Decomposition const &other)
Assigns the contents of the given decomposition to the current one by copying the contents.
storm::storage::SparseMatrix< ValueType > extractPartitionDependencyGraph(storm::storage::SparseMatrix< ValueType > const &matrix) const
block_type const & operator[](uint_fast64_t index) const
Retrieves the block with the given index.
std::vector< block_type >::const_iterator const_iterator
block_type const & getBlock(uint_fast64_t index) const
Retrieves the block with the given index.
Decomposition()
Creates an empty decomposition.
iterator begin()
Retrieves an iterator that points to the first block of this decomposition.
std::vector< block_type > blocks
iterator end()
Retrieves an iterator that points past the last block of this decomposition.
bool empty() const
Checks if the decomposition is empty.
LongRunComponentType block_type
std::size_t size() const
Retrieves the number of blocks of this decomposition.
A class that can be used to build a sparse matrix by adding value by value.
A class that holds a possibly non-square matrix in the compressed row storage format.
index_type getRowGroupCount() const
Returns the number of row groups in the matrix.
boost::container::flat_set< Key, std::less< Key >, boost::container::new_allocator< Key > > FlatSet
Redefinition of flat_set was needed, because from Boost 1.70 on the default allocator is set to void.
std::ostream & operator<<(std::ostream &out, ParameterRegion< ParametricType > const ®ion)