Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Decomposition.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <ostream>
5#include <vector>
6
9
10namespace storm {
11namespace storage {
12
16template<typename BlockType>
18 public:
19 typedef BlockType block_type;
20 typedef typename std::vector<block_type>::iterator iterator;
21 typedef typename std::vector<block_type>::const_iterator const_iterator;
22
27
31 virtual ~Decomposition() = default;
32
38 Decomposition(Decomposition const& other);
39
47
54
62
68 std::size_t size() const;
69
75 bool empty() const;
76
83
89 iterator end();
90
96 const_iterator begin() const;
97
103 const_iterator end() const;
104
111 block_type const& getBlock(uint_fast64_t index) const;
112
119 block_type& getBlock(uint_fast64_t index);
120
127 block_type const& operator[](uint_fast64_t index) const;
128
135 block_type& operator[](uint_fast64_t index);
136
137 // Declare the streaming operator as a friend function to enable output of decompositions.
138 template<typename BlockTypePrime>
139 friend std::ostream& operator<<(std::ostream& out, Decomposition<BlockTypePrime> const& decomposition);
140
141 template<typename ValueType>
143
144 protected:
145 // The blocks of the decomposition.
146 std::vector<block_type> blocks;
147};
148} // namespace storage
149} // namespace storm
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
friend std::ostream & operator<<(std::ostream &out, Decomposition< BlockTypePrime > const &decomposition)
iterator end()
Retrieves an iterator that points past the last block of this decomposition.
virtual ~Decomposition()=default
Default (virtual) deconstructor.
bool empty() const
Checks if the decomposition is empty.
std::size_t size() const
Retrieves the number of blocks of this decomposition.
A class that holds a possibly non-square matrix in the compressed row storage format.