Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::storage::StateBlock Class Reference

#include <StateBlock.h>

Inheritance diagram for storm::storage::StateBlock:

Public Types

typedef FlatSetStateContainer container_type
 
typedef container_type::value_type value_type
 
typedef container_type::iterator iterator
 
typedef container_type::const_iterator const_iterator
 

Public Member Functions

 StateBlock ()=default
 
 StateBlock (StateBlock const &other)=default
 
 StateBlock (StateBlock &&other)=default
 
StateBlockoperator= (StateBlock const &other)=default
 
StateBlockoperator= (StateBlock &&other)=default
 
template<typename InputIterator >
 StateBlock (InputIterator first, InputIterator last, bool sortedAndUnique=false)
 Creates a state block and inserts all elements in the given range.
 
 StateBlock (std::initializer_list< sparse::state_type > list)
 Constructs a state block from the given initializer list.
 
bool operator== (StateBlock const &other) const
 Checks whether the two state blocks contain exactly the same states.
 
iterator begin ()
 Returns an iterator to the states in this SCC.
 
const_iterator begin () const
 Returns a const iterator to the states in this SCC.
 
const_iterator cbegin () const
 Returns a const iterator to the states in this SCC.
 
iterator end ()
 Returns an iterator that points one past the end of the states in this SCC.
 
const_iterator end () const
 Returns a const iterator that points one past the end of the states in this SCC.
 
const_iterator cend () const
 Returns a const iterator that points one past the end of the states in this SCC.
 
bool containsState (value_type const &state) const
 Retrieves whether the given state is in the SCC.
 
void insert (value_type const &state)
 Inserts the given element into this SCC.
 
iterator insert (container_type::const_iterator iterator, value_type const &state)
 Inserts the given element into this SCC.
 
void erase (value_type const &state)
 Removes the given element from this SCC.
 
std::size_t size () const
 Retrieves the number of states in this SCC.
 
bool empty () const
 Retrieves whether this SCC is empty.
 
container_type const & getStates () const
 Retrieves the set of states contained in the StateBlock.
 

Detailed Description

Definition at line 20 of file StateBlock.h.

Member Typedef Documentation

◆ const_iterator

typedef container_type::const_iterator storm::storage::StateBlock::const_iterator

Definition at line 26 of file StateBlock.h.

◆ container_type

◆ iterator

typedef container_type::iterator storm::storage::StateBlock::iterator

Definition at line 25 of file StateBlock.h.

◆ value_type

typedef container_type::value_type storm::storage::StateBlock::value_type

Definition at line 23 of file StateBlock.h.

Constructor & Destructor Documentation

◆ StateBlock() [1/5]

storm::storage::StateBlock::StateBlock ( )
default

◆ StateBlock() [2/5]

storm::storage::StateBlock::StateBlock ( StateBlock const &  other)
default

◆ StateBlock() [3/5]

storm::storage::StateBlock::StateBlock ( StateBlock &&  other)
default

◆ StateBlock() [4/5]

template<typename InputIterator >
storm::storage::StateBlock::StateBlock ( InputIterator  first,
InputIterator  last,
bool  sortedAndUnique = false 
)
inline

Creates a state block and inserts all elements in the given range.

Parameters
firstThe first element of the range to insert.
lastThe last element of the range (that is itself not inserted).
sortedAndUniqueIf set to true, the input range is assumed to be sorted and duplicate-free.

Definition at line 44 of file StateBlock.h.

◆ StateBlock() [5/5]

storm::storage::StateBlock::StateBlock ( std::initializer_list< sparse::state_type list)
inline

Constructs a state block from the given initializer list.

Parameters
listThe list of states to add to this state block.

Definition at line 57 of file StateBlock.h.

Member Function Documentation

◆ begin() [1/2]

StateBlock::iterator storm::storage::StateBlock::begin ( )

Returns an iterator to the states in this SCC.

Returns
An iterator to the states in this SCC.

Definition at line 5 of file StateBlock.cpp.

◆ begin() [2/2]

StateBlock::const_iterator storm::storage::StateBlock::begin ( ) const

Returns a const iterator to the states in this SCC.

Returns
A const iterator to the states in this SCC.

Definition at line 9 of file StateBlock.cpp.

◆ cbegin()

const_iterator storm::storage::StateBlock::cbegin ( ) const
inline

Returns a const iterator to the states in this SCC.

Returns
A const iterator to the states in this SCC.

Definition at line 90 of file StateBlock.h.

◆ cend()

const_iterator storm::storage::StateBlock::cend ( ) const
inline

Returns a const iterator that points one past the end of the states in this SCC.

Returns
A const iterator that points one past the end of the states in this SCC.

Definition at line 113 of file StateBlock.h.

◆ containsState()

bool storm::storage::StateBlock::containsState ( value_type const &  state) const

Retrieves whether the given state is in the SCC.

Parameters
stateThe state for which to query membership.

Definition at line 41 of file StateBlock.cpp.

◆ empty()

bool storm::storage::StateBlock::empty ( ) const

Retrieves whether this SCC is empty.

Returns
True iff the SCC is empty.

Definition at line 25 of file StateBlock.cpp.

◆ end() [1/2]

StateBlock::iterator storm::storage::StateBlock::end ( )

Returns an iterator that points one past the end of the states in this SCC.

Returns
An iterator that points one past the end of the states in this SCC.

Definition at line 13 of file StateBlock.cpp.

◆ end() [2/2]

StateBlock::const_iterator storm::storage::StateBlock::end ( ) const

Returns a const iterator that points one past the end of the states in this SCC.

Returns
A const iterator that points one past the end of the states in this SCC.

Definition at line 17 of file StateBlock.cpp.

◆ erase()

void storm::storage::StateBlock::erase ( value_type const &  state)

Removes the given element from this SCC.

Parameters
stateThe element to remove.

Definition at line 37 of file StateBlock.cpp.

◆ getStates()

StateBlock::container_type const & storm::storage::StateBlock::getStates ( ) const

Retrieves the set of states contained in the StateBlock.

Returns
The set of states contained in the StateBlock.

Definition at line 45 of file StateBlock.cpp.

◆ insert() [1/2]

StateBlock::iterator storm::storage::StateBlock::insert ( container_type::const_iterator  iterator,
value_type const &  state 
)

Inserts the given element into this SCC.

Parameters
stateThe state to add to this SCC.

Definition at line 33 of file StateBlock.cpp.

◆ insert() [2/2]

void storm::storage::StateBlock::insert ( value_type const &  state)

Inserts the given element into this SCC.

Parameters
stateThe state to add to this SCC.

Definition at line 29 of file StateBlock.cpp.

◆ operator=() [1/2]

StateBlock & storm::storage::StateBlock::operator= ( StateBlock &&  other)
default

◆ operator=() [2/2]

StateBlock & storm::storage::StateBlock::operator= ( StateBlock const &  other)
default

◆ operator==()

bool storm::storage::StateBlock::operator== ( StateBlock const &  other) const
inline

Checks whether the two state blocks contain exactly the same states.

Parameters
otherThe state block with which to compare the current one.
Returns
True iff the two state blocks contain exactly the same states.

Definition at line 67 of file StateBlock.h.

◆ size()

std::size_t storm::storage::StateBlock::size ( ) const

Retrieves the number of states in this SCC.

Returns
The number of states in this SCC.

Definition at line 21 of file StateBlock.cpp.


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