mCRL2
Loading...
Searching...
No Matches
mcrl2::lts::detail::bisim_dnj::iterator_or_counter< Iterator > Class Template Reference

union: either iterator or counter (for initialisation) More...

#include <liblts_bisim_dnj.h>

Public Member Functions

 iterator_or_counter ()
 Construct the object as a counter.
 
void convert_to_iterator (const Iterator other)
 Convert the object from counter to iterator.
 
 ~iterator_or_counter ()
 Destruct the object as an iterator.
 

Public Attributes

trans_type count
 counter (used during initialisation)
 
Iterator begin
 iterator (used during main part of the algorithm)
 

Detailed Description

template<class Iterator>
class mcrl2::lts::detail::bisim_dnj::iterator_or_counter< Iterator >

union: either iterator or counter (for initialisation)

During initialisation, we need some counters to count the number of transitions for each state. To avoid allocating separate memory for these counters, we store their value in the same place where we later store an iterator.

We assume that each such variable starts out as a counter and at some point becomes an iterator. That point is marked by calling convert_to_iterator(). The structure may only be destroyed after that call, as the destructor assumes it's an iterator.

Definition at line 158 of file liblts_bisim_dnj.h.

Constructor & Destructor Documentation

◆ iterator_or_counter()

template<class Iterator >
mcrl2::lts::detail::bisim_dnj::iterator_or_counter< Iterator >::iterator_or_counter ( )
inline

Construct the object as a counter.

Definition at line 167 of file liblts_bisim_dnj.h.

◆ ~iterator_or_counter()

template<class Iterator >
mcrl2::lts::detail::bisim_dnj::iterator_or_counter< Iterator >::~iterator_or_counter ( )
inline

Destruct the object as an iterator.

Definition at line 178 of file liblts_bisim_dnj.h.

Member Function Documentation

◆ convert_to_iterator()

template<class Iterator >
void mcrl2::lts::detail::bisim_dnj::iterator_or_counter< Iterator >::convert_to_iterator ( const Iterator  other)
inline

Convert the object from counter to iterator.

Definition at line 171 of file liblts_bisim_dnj.h.

Member Data Documentation

◆ begin

template<class Iterator >
Iterator mcrl2::lts::detail::bisim_dnj::iterator_or_counter< Iterator >::begin

iterator (used during main part of the algorithm)

Definition at line 164 of file liblts_bisim_dnj.h.

◆ count

template<class Iterator >
trans_type mcrl2::lts::detail::bisim_dnj::iterator_or_counter< Iterator >::count

counter (used during initialisation)

Definition at line 161 of file liblts_bisim_dnj.h.


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