Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Decomposition.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_DECOMPOSITION_H_
2#define STORM_STORAGE_DECOMPOSITION_H_
3
4#include <cstdint>
5#include <ostream>
6#include <vector>
7
10
11namespace storm {
12namespace storage {
13
17template<typename BlockType>
19 public:
20 typedef BlockType block_type;
21 typedef typename std::vector<block_type>::iterator iterator;
22 typedef typename std::vector<block_type>::const_iterator const_iterator;
23
28
32 virtual ~Decomposition() = default;
33
39 Decomposition(Decomposition const& other);
40
48
55
63
69 std::size_t size() const;
70
76 bool empty() const;
77
84
90 iterator end();
91
97 const_iterator begin() const;
98
104 const_iterator end() const;
105
112 block_type const& getBlock(uint_fast64_t index) const;
113
120 block_type& getBlock(uint_fast64_t index);
121
128 block_type const& operator[](uint_fast64_t index) const;
129
136 block_type& operator[](uint_fast64_t index);
137
138 // Declare the streaming operator as a friend function to enable output of decompositions.
139 template<typename BlockTypePrime>
140 friend std::ostream& operator<<(std::ostream& out, Decomposition<BlockTypePrime> const& decomposition);
141
142 template<typename ValueType>
144
145 protected:
146 // The blocks of the decomposition.
147 std::vector<block_type> blocks;
148};
149} // namespace storage
150} // namespace storm
151
152#endif /* STORM_STORAGE_DECOMPOSITION_H_ */
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
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.
LabParser.cpp.
Definition cli.cpp:18