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

This class represents a maximal end-component of a nondeterministic model. More...

#include <MaximalEndComponent.h>

Public Types

typedef storm::storage::FlatSet< sparse::state_typeset_type
 
typedef std::unordered_map< uint_fast64_t, set_typemap_type
 
typedef map_type::iterator iterator
 
typedef map_type::const_iterator const_iterator
 

Public Member Functions

 MaximalEndComponent ()
 Creates an empty MEC.
 
 MaximalEndComponent (MaximalEndComponent const &other)
 Creates an MEC by copying the given one.
 
MaximalEndComponentoperator= (MaximalEndComponent const &other)
 Assigns the contents of the given MEC to the current one via copying.
 
 MaximalEndComponent (MaximalEndComponent &&other)
 Creates an MEC by moving the given one.
 
MaximalEndComponentoperator= (MaximalEndComponent &&other)
 Assigns the contents of the given MEC to the current one via moving.
 
bool operator== (MaximalEndComponent const &other)
 
bool operator!= (MaximalEndComponent const &other)
 
void addState (uint_fast64_t state, set_type const &choices)
 Adds the given state and the given choices to the MEC.
 
void addState (uint_fast64_t state, set_type &&choices)
 Adds the given state and the given choices to the MEC.
 
std::size_t size () const
 
set_type const & getChoicesForState (uint_fast64_t state) const
 Retrieves the choices for the given state that are contained in this MEC under the assumption that the state is in the MEC.
 
set_typegetChoicesForState (uint_fast64_t state)
 Retrieves the choices for the given state that are contained in this MEC under the assumption that the state is in the MEC.
 
void removeState (uint_fast64_t state)
 Removes the given state and all of its choices from the MEC.
 
bool containsState (uint_fast64_t state) const
 Retrieves whether the given state is contained in this MEC.
 
bool containsAnyState (storm::storage::BitVector stateSet) const
 Retrieves whether at least one of the given states is contained in this MEC.
 
bool containsChoice (uint_fast64_t state, uint_fast64_t choice) const
 Retrieves whether the given choice for the given state is contained in the MEC.
 
set_type getStateSet () const
 Retrieves the set of states contained in the MEC.
 
iterator begin ()
 Retrieves an iterator that points to the first state and its choices in the MEC.
 
iterator end ()
 Retrieves an iterator that points past the last state and its choices in the MEC.
 
const_iterator begin () const
 Retrieves an iterator that points to the first state and its choices in the MEC.
 
const_iterator end () const
 Retrieves an iterator that points past the last state and its choices in the MEC.
 

Friends

std::ostream & operator<< (std::ostream &out, MaximalEndComponent const &component)
 

Detailed Description

This class represents a maximal end-component of a nondeterministic model.

Definition at line 17 of file MaximalEndComponent.h.

Member Typedef Documentation

◆ const_iterator

typedef map_type::const_iterator storm::storage::MaximalEndComponent::const_iterator

Definition at line 22 of file MaximalEndComponent.h.

◆ iterator

Definition at line 21 of file MaximalEndComponent.h.

◆ map_type

typedef std::unordered_map<uint_fast64_t, set_type> storm::storage::MaximalEndComponent::map_type

Definition at line 20 of file MaximalEndComponent.h.

◆ set_type

Constructor & Destructor Documentation

◆ MaximalEndComponent() [1/3]

storm::storage::MaximalEndComponent::MaximalEndComponent ( )

Creates an empty MEC.

Definition at line 10 of file MaximalEndComponent.cpp.

◆ MaximalEndComponent() [2/3]

storm::storage::MaximalEndComponent::MaximalEndComponent ( MaximalEndComponent const &  other)

Creates an MEC by copying the given one.

Parameters
otherThe MEC to copy.

Definition at line 14 of file MaximalEndComponent.cpp.

◆ MaximalEndComponent() [3/3]

storm::storage::MaximalEndComponent::MaximalEndComponent ( MaximalEndComponent &&  other)

Creates an MEC by moving the given one.

Parameters
otherThe MEC to move.

Definition at line 23 of file MaximalEndComponent.cpp.

Member Function Documentation

◆ addState() [1/2]

void storm::storage::MaximalEndComponent::addState ( uint_fast64_t  state,
set_type &&  choices 
)

Adds the given state and the given choices to the MEC.

Parameters
stateThe state for which to add the choices.
choicesThe choices to add for the state.

Definition at line 44 of file MaximalEndComponent.cpp.

◆ addState() [2/2]

void storm::storage::MaximalEndComponent::addState ( uint_fast64_t  state,
set_type const &  choices 
)

Adds the given state and the given choices to the MEC.

Parameters
stateThe state for which to add the choices.
choicesThe choices to add for the state.

Definition at line 40 of file MaximalEndComponent.cpp.

◆ begin() [1/2]

MaximalEndComponent::iterator storm::storage::MaximalEndComponent::begin ( )

Retrieves an iterator that points to the first state and its choices in the MEC.

Returns
An iterator that points to the first state and its choices in the MEC.

Definition at line 135 of file MaximalEndComponent.cpp.

◆ begin() [2/2]

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

Retrieves an iterator that points to the first state and its choices in the MEC.

Returns
An iterator that points to the first state and its choices in the MEC.

Definition at line 143 of file MaximalEndComponent.cpp.

◆ containsAnyState()

bool storm::storage::MaximalEndComponent::containsAnyState ( storm::storage::BitVector  stateSet) const

Retrieves whether at least one of the given states is contained in this MEC.

Parameters
stateSetThe states for which to query membership in the MEC.
Returns
True if any of the given states is contained in the MEC.

Definition at line 83 of file MaximalEndComponent.cpp.

◆ containsChoice()

bool storm::storage::MaximalEndComponent::containsChoice ( uint_fast64_t  state,
uint_fast64_t  choice 
) const

Retrieves whether the given choice for the given state is contained in the MEC.

Parameters
stateThe state for which to check whether the given choice is contained in the MEC.
choiceThe choice for which to check whether it is contained in the MEC.
Returns
True if the given choice is contained in the MEC.

Definition at line 103 of file MaximalEndComponent.cpp.

◆ containsState()

bool storm::storage::MaximalEndComponent::containsState ( uint_fast64_t  state) const

Retrieves whether the given state is contained in this MEC.

Parameters
stateThe state for which to query membership in the MEC.
Returns
True if the given state is contained in the MEC.

Definition at line 74 of file MaximalEndComponent.cpp.

◆ end() [1/2]

MaximalEndComponent::iterator storm::storage::MaximalEndComponent::end ( )

Retrieves an iterator that points past the last state and its choices in the MEC.

Returns
An iterator that points past the last state and its choices in the MEC.

Definition at line 139 of file MaximalEndComponent.cpp.

◆ end() [2/2]

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

Retrieves an iterator that points past the last state and its choices in the MEC.

Returns
An iterator that points past the last state and its choices in the MEC.

Definition at line 147 of file MaximalEndComponent.cpp.

◆ getChoicesForState() [1/2]

MaximalEndComponent::set_type & storm::storage::MaximalEndComponent::getChoicesForState ( uint_fast64_t  state)

Retrieves the choices for the given state that are contained in this MEC under the assumption that the state is in the MEC.

Parameters
stateThe state for which to retrieve the choices.
Returns
A set of choices of the state in the MEC.

Definition at line 63 of file MaximalEndComponent.cpp.

◆ getChoicesForState() [2/2]

MaximalEndComponent::set_type const & storm::storage::MaximalEndComponent::getChoicesForState ( uint_fast64_t  state) const

Retrieves the choices for the given state that are contained in this MEC under the assumption that the state is in the MEC.

Parameters
stateThe state for which to retrieve the choices.
Returns
A set of choices of the state in the MEC.

Definition at line 52 of file MaximalEndComponent.cpp.

◆ getStateSet()

MaximalEndComponent::set_type storm::storage::MaximalEndComponent::getStateSet ( ) const

Retrieves the set of states contained in the MEC.

Returns
The set of states contained in the MEC.

Definition at line 114 of file MaximalEndComponent.cpp.

◆ operator!=()

bool storm::storage::MaximalEndComponent::operator!= ( MaximalEndComponent const &  other)
Returns
true iff this is a different MEC as other

Definition at line 36 of file MaximalEndComponent.cpp.

◆ operator=() [1/2]

MaximalEndComponent & storm::storage::MaximalEndComponent::operator= ( MaximalEndComponent &&  other)

Assigns the contents of the given MEC to the current one via moving.

Parameters
otherThe MEC whose contents to move.

Definition at line 27 of file MaximalEndComponent.cpp.

◆ operator=() [2/2]

MaximalEndComponent & storm::storage::MaximalEndComponent::operator= ( MaximalEndComponent const &  other)

Assigns the contents of the given MEC to the current one via copying.

Parameters
otherThe MEC whose contents to copy.

Definition at line 18 of file MaximalEndComponent.cpp.

◆ operator==()

bool storm::storage::MaximalEndComponent::operator== ( MaximalEndComponent const &  other)
Returns
true iff this is the same MEC as other

Definition at line 32 of file MaximalEndComponent.cpp.

◆ removeState()

void storm::storage::MaximalEndComponent::removeState ( uint_fast64_t  state)

Removes the given state and all of its choices from the MEC.

Parameters
stateThe state to remove froom the MEC.

Definition at line 93 of file MaximalEndComponent.cpp.

◆ size()

std::size_t storm::storage::MaximalEndComponent::size ( ) const
Returns
The number of states in this mec.

Definition at line 48 of file MaximalEndComponent.cpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
MaximalEndComponent const &  component 
)
friend

Definition at line 125 of file MaximalEndComponent.cpp.


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