Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::storage::Decomposition< BlockType > Class Template Reference

This class represents the decomposition of a model into blocks which are of the template type. More...

#include <Decomposition.h>

Public Types

typedef BlockType block_type
 
typedef std::vector< block_type >::iterator iterator
 
typedef std::vector< block_type >::const_iterator const_iterator
 

Public Member Functions

 Decomposition ()
 Creates an empty decomposition.
 
virtual ~Decomposition ()=default
 Default (virtual) deconstructor.
 
 Decomposition (Decomposition const &other)
 Creates a decomposition by copying the given decomposition.
 
Decompositionoperator= (Decomposition const &other)
 Assigns the contents of the given decomposition to the current one by copying the contents.
 
 Decomposition (Decomposition &&other)
 Creates a decomposition by moving the given decomposition.
 
Decompositionoperator= (Decomposition &&other)
 Assigns the contents of the given decomposition to the current one by moving the contents.
 
std::size_t size () const
 Retrieves the number of blocks of this decomposition.
 
bool empty () const
 Checks if the decomposition is empty.
 
iterator begin ()
 Retrieves an iterator that points to the first block of this decomposition.
 
iterator end ()
 Retrieves an iterator that points past the last block of this decomposition.
 
const_iterator begin () const
 Retrieves a const iterator that points to the first block of this decomposition.
 
const_iterator end () const
 Retrieves a const iterator that points past the last block of this decomposition.
 
block_type const & getBlock (uint_fast64_t index) const
 Retrieves the block with the given index.
 
block_typegetBlock (uint_fast64_t index)
 Retrieves the block with the given index.
 
block_type const & operator[] (uint_fast64_t index) const
 Retrieves the block with the given index.
 
block_typeoperator[] (uint_fast64_t index)
 Retrieves the block with the given index.
 
template<typename ValueType >
storm::storage::SparseMatrix< ValueType > extractPartitionDependencyGraph (storm::storage::SparseMatrix< ValueType > const &matrix) const
 

Protected Attributes

std::vector< block_typeblocks
 

Friends

template<typename BlockTypePrime >
std::ostream & operator<< (std::ostream &out, Decomposition< BlockTypePrime > const &decomposition)
 

Detailed Description

template<typename BlockType>
class storm::storage::Decomposition< BlockType >

This class represents the decomposition of a model into blocks which are of the template type.

Definition at line 18 of file Decomposition.h.

Member Typedef Documentation

◆ block_type

template<typename BlockType >
typedef BlockType storm::storage::Decomposition< BlockType >::block_type

Definition at line 20 of file Decomposition.h.

◆ const_iterator

template<typename BlockType >
typedef std::vector<block_type>::const_iterator storm::storage::Decomposition< BlockType >::const_iterator

Definition at line 22 of file Decomposition.h.

◆ iterator

template<typename BlockType >
typedef std::vector<block_type>::iterator storm::storage::Decomposition< BlockType >::iterator

Definition at line 21 of file Decomposition.h.

Constructor & Destructor Documentation

◆ Decomposition() [1/3]

template<typename BlockType >
storm::storage::Decomposition< BlockType >::Decomposition ( )

Creates an empty decomposition.

Definition at line 13 of file Decomposition.cpp.

◆ ~Decomposition()

template<typename BlockType >
virtual storm::storage::Decomposition< BlockType >::~Decomposition ( )
virtualdefault

Default (virtual) deconstructor.

◆ Decomposition() [2/3]

template<typename BlockType >
storm::storage::Decomposition< BlockType >::Decomposition ( Decomposition< BlockType > const &  other)

Creates a decomposition by copying the given decomposition.

Parameters
otherThe decomposition to copy.

Definition at line 18 of file Decomposition.cpp.

◆ Decomposition() [3/3]

template<typename BlockType >
storm::storage::Decomposition< BlockType >::Decomposition ( Decomposition< BlockType > &&  other)

Creates a decomposition by moving the given decomposition.

Parameters
otherThe decomposition to move.

Definition at line 29 of file Decomposition.cpp.

Member Function Documentation

◆ begin() [1/2]

template<typename BlockType >
Decomposition< BlockType >::iterator storm::storage::Decomposition< BlockType >::begin ( )

Retrieves an iterator that points to the first block of this decomposition.

Returns
An iterator that points to the first block of this decomposition.

Definition at line 50 of file Decomposition.cpp.

◆ begin() [2/2]

template<typename BlockType >
Decomposition< BlockType >::const_iterator storm::storage::Decomposition< BlockType >::begin ( ) const

Retrieves a const iterator that points to the first block of this decomposition.

Returns
A const iterator that points to the first block of this decomposition.

Definition at line 60 of file Decomposition.cpp.

◆ empty()

template<typename BlockType >
bool storm::storage::Decomposition< BlockType >::empty ( ) const

Checks if the decomposition is empty.

Returns
True, if the decomposition is empty.

Definition at line 45 of file Decomposition.cpp.

◆ end() [1/2]

template<typename BlockType >
Decomposition< BlockType >::iterator storm::storage::Decomposition< BlockType >::end ( )

Retrieves an iterator that points past the last block of this decomposition.

Returns
An iterator that points past the last block of this decomposition.

Definition at line 55 of file Decomposition.cpp.

◆ end() [2/2]

template<typename BlockType >
Decomposition< BlockType >::const_iterator storm::storage::Decomposition< BlockType >::end ( ) const

Retrieves a const iterator that points past the last block of this decomposition.

Returns
A const iterator that points past the last block of this decomposition.

Definition at line 65 of file Decomposition.cpp.

◆ extractPartitionDependencyGraph()

template<typename BlockType >
template<typename ValueType >
template storm::storage::SparseMatrix< double > storm::storage::Decomposition< BlockType >::extractPartitionDependencyGraph ( storm::storage::SparseMatrix< ValueType > const &  matrix) const

Definition at line 91 of file Decomposition.cpp.

◆ getBlock() [1/2]

template<typename BlockType >
BlockType & storm::storage::Decomposition< BlockType >::getBlock ( uint_fast64_t  index)

Retrieves the block with the given index.

If the index is out-of-bounds, an exception is thrown.

Parameters
indexThe index of the block to retrieve.
Returns
The block with the given index.

Definition at line 75 of file Decomposition.cpp.

◆ getBlock() [2/2]

template<typename BlockType >
BlockType const & storm::storage::Decomposition< BlockType >::getBlock ( uint_fast64_t  index) const

Retrieves the block with the given index.

If the index is out-of-bounds, an exception is thrown.

Parameters
indexThe index of the block to retrieve.
Returns
The block with the given index.

Definition at line 70 of file Decomposition.cpp.

◆ operator=() [1/2]

template<typename BlockType >
Decomposition< BlockType > & storm::storage::Decomposition< BlockType >::operator= ( Decomposition< BlockType > &&  other)

Assigns the contents of the given decomposition to the current one by moving the contents.

Parameters
otherThe decomposition whose values to move.
Returns
The current decomposition.

Definition at line 34 of file Decomposition.cpp.

◆ operator=() [2/2]

template<typename BlockType >
Decomposition< BlockType > & storm::storage::Decomposition< BlockType >::operator= ( Decomposition< BlockType > const &  other)

Assigns the contents of the given decomposition to the current one by copying the contents.

Parameters
otherThe decomposition whose values to copy.
Returns
The current decomposition.

Definition at line 23 of file Decomposition.cpp.

◆ operator[]() [1/2]

template<typename BlockType >
BlockType & storm::storage::Decomposition< BlockType >::operator[] ( uint_fast64_t  index)

Retrieves the block with the given index.

If the index is out-of-bounds, an behaviour is undefined.

Parameters
indexThe index of the block to retrieve.
Returns
The block with the given index.

Definition at line 85 of file Decomposition.cpp.

◆ operator[]() [2/2]

template<typename BlockType >
BlockType const & storm::storage::Decomposition< BlockType >::operator[] ( uint_fast64_t  index) const

Retrieves the block with the given index.

If the index is out-of-bounds, an behaviour is undefined.

Parameters
indexThe index of the block to retrieve.
Returns
The block with the given index.

Definition at line 80 of file Decomposition.cpp.

◆ size()

template<typename BlockType >
std::size_t storm::storage::Decomposition< BlockType >::size ( ) const

Retrieves the number of blocks of this decomposition.

Returns
The number of blocks of this decomposition.

Definition at line 40 of file Decomposition.cpp.

Friends And Related Symbol Documentation

◆ operator<<

template<typename BlockType >
template<typename BlockTypePrime >
std::ostream & operator<< ( std::ostream &  out,
Decomposition< BlockTypePrime > const &  decomposition 
)
friend

Member Data Documentation

◆ blocks

template<typename BlockType >
std::vector<block_type> storm::storage::Decomposition< BlockType >::blocks
protected

Definition at line 147 of file Decomposition.h.


The documentation for this class was generated from the following files: