Queue of sites (based on std::deque). More...
#include <p_queue.hh>

Public Types | |
| typedef p_indexed_bkd_piter < self_ > | bkd_piter |
| Backward Site_Iterator associated type. | |
| typedef Site_Set< void > | category |
| typedef P | element |
| Element associated type. | |
| typedef p_queue< P > | exact_t |
| typedef p_indexed_fwd_piter < self_ > | fwd_piter |
| Forward Site_Iterator associated type. | |
| typedef P | i_element |
| Insertion element associated type. | |
| typedef fwd_piter | piter |
| Site_Iterator associated type. | |
| typedef p_indexed_psite< self_ > | psite |
| Psite associated type. | |
| typedef subject< P >::ret | site |
| Site associated type. | |
Public Member Functions | |
| void | clear () |
| Clear the queue. | |
| const P & | front () const |
Give the front site p of the queue; p is the least recently inserted site. | |
| bool | has (const psite &p) const |
Test if p belongs to this site set. | |
| bool | has (const util::index &i) const |
Test if index i belongs to this site set. | |
| void | insert (const P &p) |
Insert a site p (equivalent as 'push'). | |
| bool | is_empty () const |
| Test if the site set is empty. | |
| bool | is_valid () const |
| This set is always valid so it returns true. | |
| std::size_t | memory_size () const |
| Return the size of this site set in memory. | |
| unsigned | nsites () const |
| Give the number of sites. | |
| const P & | operator[] (unsigned i) const |
Return the i-th site. | |
| p_queue () | |
| Constructor without argument. | |
| void | pop () |
Pop (remove) the front site p from the queue; p is the least recently inserted site. | |
| P | pop_front () |
Pop (remove) the front site p from the queue; p is the least recently inserted site and give the front site p of the queue; p is the least recently inserted site. | |
| void | push (const P &p) |
Push a site p in the queue. | |
| const std::deque< P > & | std_deque () const |
| Return the corresponding std::deque of sites. | |
Protected Attributes | |
| std::deque< P > | q_ |
Private Types | |
| typedef p_queue< P > | self_ |
Queue of sites (based on std::deque).
The parameter P shall be a site or pseudo-site type.
Definition at line 74 of file p_queue.hh.
| typedef p_indexed_bkd_piter<self_> mln::p_queue< P >::bkd_piter |
Backward Site_Iterator associated type.
Definition at line 90 of file p_queue.hh.
typedef Site_Set<void> mln::Site_Set< p_queue< P > >::category [inherited] |
Reimplemented from mln::Object< p_queue< P > >.
Definition at line 67 of file mln/core/concept/site_set.hh.
| typedef P mln::p_queue< P >::element |
Element associated type.
Definition at line 80 of file p_queue.hh.
typedef p_queue< P > mln::Object< p_queue< P > >::exact_t [inherited] |
| typedef p_indexed_fwd_piter<self_> mln::p_queue< P >::fwd_piter |
Forward Site_Iterator associated type.
Definition at line 87 of file p_queue.hh.
| typedef P mln::p_queue< P >::i_element |
Insertion element associated type.
Definition at line 118 of file p_queue.hh.
| typedef fwd_piter mln::p_queue< P >::piter |
Site_Iterator associated type.
Definition at line 93 of file p_queue.hh.
| typedef p_indexed_psite<self_> mln::p_queue< P >::psite |
Psite associated type.
Definition at line 84 of file p_queue.hh.
typedef p_queue<P> mln::p_queue< P >::self_ [private] |
Definition at line 76 of file p_queue.hh.
typedef subject<P>::ret mln::internal::site_set_base_< P, p_queue< P > >::site [inherited] |
Site associated type.
Definition at line 55 of file site_set_base.hh.
| mln::p_queue< P >::p_queue | ( | ) | [inline] |
Constructor without argument.
Definition at line 163 of file p_queue.hh.
| void mln::p_queue< P >::clear | ( | ) | [inline] |
| const P & mln::p_queue< P >::front | ( | ) | const [inline] |
Give the front site p of the queue; p is the least recently inserted site.
Definition at line 224 of file p_queue.hh.
References mln::internal::site_set_base_< P, p_queue< P > >::is_empty(), and mln::p_queue< P >::q_.
Referenced by mln::p_queue< P >::pop_front(), and mln::geom::impl::seeds2tiling().
| bool mln::p_queue< P >::has | ( | const util::index & | i | ) | const [inline] |
Test if index i belongs to this site set.
Definition at line 183 of file p_queue.hh.
References mln::p_queue< P >::nsites().
| bool mln::p_queue< P >::has | ( | const psite & | p | ) | const [inline] |
Test if p belongs to this site set.
Definition at line 170 of file p_queue.hh.
References mln::p_indexed_psite< S >::index(), mln::p_queue< P >::nsites(), mln::p_indexed_psite< S >::target_(), and mln::internal::pseudo_site_base_< P, E >::to_site().
| void mln::p_queue< P >::insert | ( | const P & | p | ) | [inline] |
Insert a site p (equivalent as 'push').
Definition at line 261 of file p_queue.hh.
References mln::p_queue< P >::push().
| bool mln::internal::site_set_base_< P, p_queue< P > >::is_empty | ( | ) | const [inherited] |
Test if the site set is empty.
This final method dispatches to is_empty_ whose default implementation relies on the 'nsites' method.
Referenced by mln::p_queue< P >::front(), mln::p_queue< P >::pop(), mln::p_queue< P >::pop_front(), and mln::geom::impl::seeds2tiling().
| bool mln::p_queue< P >::is_valid | ( | ) | const [inline] |
This set is always valid so it returns true.
Definition at line 191 of file p_queue.hh.
| std::size_t mln::p_queue< P >::memory_size | ( | ) | const [inline] |
Return the size of this site set in memory.
Definition at line 277 of file p_queue.hh.
References mln::p_queue< P >::nsites(), and mln::p_queue< P >::q_.
| unsigned mln::p_queue< P >::nsites | ( | ) | const [inline] |
Give the number of sites.
Definition at line 199 of file p_queue.hh.
References mln::p_queue< P >::q_.
Referenced by mln::p_queue< P >::has(), mln::p_queue< P >::memory_size(), and mln::p_queue< P >::operator[]().
| const P & mln::p_queue< P >::operator[] | ( | unsigned | i | ) | const [inline] |
Return the i-th site.
Definition at line 252 of file p_queue.hh.
References mln::p_queue< P >::nsites(), and mln::p_queue< P >::q_.
| void mln::p_queue< P >::pop | ( | ) | [inline] |
Pop (remove) the front site p from the queue; p is the least recently inserted site.
Definition at line 215 of file p_queue.hh.
References mln::internal::site_set_base_< P, p_queue< P > >::is_empty(), and mln::p_queue< P >::q_.
Referenced by mln::p_queue< P >::pop_front(), and mln::geom::impl::seeds2tiling().
| P mln::p_queue< P >::pop_front | ( | ) | [inline] |
Pop (remove) the front site p from the queue; p is the least recently inserted site and give the front site p of the queue; p is the least recently inserted site.
Definition at line 233 of file p_queue.hh.
References mln::p_queue< P >::front(), mln::internal::site_set_base_< P, p_queue< P > >::is_empty(), and mln::p_queue< P >::pop().
| void mln::p_queue< P >::push | ( | const P & | p | ) | [inline] |
Push a site p in the queue.
Definition at line 207 of file p_queue.hh.
References mln::p_queue< P >::q_.
Referenced by mln::p_queue< P >::insert(), and mln::geom::impl::seeds2tiling().
| const std::deque< P > & mln::p_queue< P >::std_deque | ( | ) | const [inline] |
Return the corresponding std::deque of sites.
Definition at line 269 of file p_queue.hh.
References mln::p_queue< P >::q_.
std::deque<P> mln::p_queue< P >::q_ [protected] |
Definition at line 154 of file p_queue.hh.
Referenced by mln::p_queue< P >::clear(), mln::p_queue< P >::front(), mln::p_queue< P >::memory_size(), mln::p_queue< P >::nsites(), mln::p_queue< P >::operator[](), mln::p_queue< P >::pop(), mln::p_queue< P >::push(), and mln::p_queue< P >::std_deque().
1.7.1