$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::p_queue< P > Class Template Reference

#include <mln/core/site_set/p_queue.hh>

Public Member Functions

 p_queue ()
void clear ()
const P & front () const
bool has (const psite &p) const
bool has (const util::index &i) const
void insert (const P &p)
bool is_empty () const
bool is_valid () const
std::size_t memory_size () const
unsigned nsites () const
const P & operator[] (unsigned i) const
void pop ()
pop_front ()
void push (const P &p)
const std::deque< P > & std_deque () const

Protected Attributes

std::deque< P > q_

Public Types

typedef p_indexed_bkd_piter
< self_
bkd_piter
typedef Site_Set< void > category
typedef P element
typedef p_queue< P > exact_t
typedef p_indexed_fwd_piter
< self_
fwd_piter
typedef P i_element
typedef fwd_piter piter
typedef p_indexed_psite< self_psite
typedef subject< P >::ret site

Detailed Description

template<typename P>
class mln::p_queue< P >

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.

Constructor & Destructor Documentation

template<typename P >
mln::p_queue< P >::p_queue ( )

Constructor without argument.

Member Function Documentation

template<typename P >
void mln::p_queue< P >::clear ( )

Clear the queue.

template<typename P >
const P& mln::p_queue< P >::front ( ) const

Give the front site p of the queue; p is the least recently inserted site.

template<typename P >
bool mln::p_queue< P >::has ( const psite p) const

Test if p belongs to this site set.

template<typename P >
bool mln::p_queue< P >::has ( const util::index i) const

Test if index i belongs to this site set.

template<typename P >
void mln::p_queue< P >::insert ( const P &  p)

Insert a site p (equivalent as '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.

template<typename P >
bool mln::p_queue< P >::is_valid ( ) const

This set is always valid so it returns true.

template<typename P >
std::size_t mln::p_queue< P >::memory_size ( ) const

Return the size of this site set in memory.

template<typename P >
unsigned mln::p_queue< P >::nsites ( ) const

Give the number of sites.

template<typename P >
const P& mln::p_queue< P >::operator[] ( unsigned  i) const

Return the i-th site.

template<typename P >
void mln::p_queue< P >::pop ( )

Pop (remove) the front site p from the queue; p is the least recently inserted site.

template<typename P >
P mln::p_queue< 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.

template<typename P >
void mln::p_queue< P >::push ( const P &  p)

Push a site p in the queue.

template<typename P >
const std::deque<P>& mln::p_queue< P >::std_deque ( ) const

Return the corresponding std::deque of sites.

Member Data Documentation

template<typename P >
std::deque<P> mln::p_queue< P >::q_
protected

Definition at line 154 of file p_queue.hh.

Member Typedef Documentation

template<typename P >
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

Definition at line 74 of file core/concept/site_set.hh.

template<typename P >
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

Definition at line 105 of file object.hh.

template<typename P >
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.

template<typename P >
typedef P mln::p_queue< P >::i_element

Insertion element associated type.

Definition at line 118 of file p_queue.hh.

template<typename P >
typedef fwd_piter mln::p_queue< P >::piter

Site_Iterator associated type.

Definition at line 93 of file p_queue.hh.

template<typename P >
typedef p_indexed_psite<self_> mln::p_queue< P >::psite

Psite associated type.

Definition at line 84 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 58 of file site_set_base.hh.