mln::p_queue< P > Class Template Reference
[Queue based]

Queue of sites (based on std::deque). More...

#include <p_queue.hh>

Inherits mln::internal::site_set_base_< P, mln::p_queue< P > >.

List of all members.

Public Types

typedef p_indexed_bkd_piter
< self_
bkd_piter
 Backward Site_Iterator associated type.
typedef P element
 Element associated type.
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.

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 util::index &i) const
 Test if index i belongs to this site set.
bool has (const psite &p) const
 Test if p belongs to this site set.
void insert (const P &p)
 Insert a site p (equivalent as 'push').
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.
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.

Related Functions

(Note that these are not member functions.)

template<typename Sl, typename Sr>
p_set< typename Sl::site > diff (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Set theoretic difference of lhs and rhs.
template<typename Sl, typename Sr>
p_set< typename Sl::site > inter (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Intersection between a couple of point sets.
template<typename Sl, typename Sr>
bool operator< (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Strict inclusion test between site sets lhs and rhs.
template<typename S>
std::ostream & operator<< (std::ostream &ostr, const Site_Set< S > &set)
 Print a site set set into the output stream ostr.
template<typename Sl, typename Sr>
bool operator<= (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Inclusion test between site sets lhs and rhs.
template<typename Sl, typename Sr>
bool operator== (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Equality test between site sets lhs and rhs.
template<typename Sl, typename Sr>
p_set< typename Sl::site > sym_diff (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Set theoretic symmetrical difference of lhs and rhs.
template<typename Sl, typename Sr>
p_set< typename Sl::site > uni (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs)
 Union of a couple of point sets.
template<typename S>
p_set< typename S::site > unique (const Site_Set< S > &s)
 Give the unique set of s.


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.


Member Typedef Documentation

template<typename P>
typedef p_indexed_bkd_piter<self_> mln::p_queue< P >::bkd_piter

Backward Site_Iterator associated type.

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

Element associated type.

template<typename P>
typedef p_indexed_fwd_piter<self_> mln::p_queue< P >::fwd_piter

Forward Site_Iterator associated type.

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

Insertion element associated type.

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

Site_Iterator associated type.

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

Psite associated type.


Constructor & Destructor Documentation

template<typename P>
mln::p_queue< P >::p_queue (  )  [inline]

Constructor without argument.


Member Function Documentation

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

Clear the queue.

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

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

Referenced by mln::p_queue< P >::pop_front(), and mln::geom::impl::seeds2tiling().

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

Test if index i belongs to this site set.

References mln::p_queue< P >::nsites().

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

Test if p belongs to this site set.

References mln::p_indexed_psite< S >::index(), and mln::p_queue< P >::nsites().

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

Insert a site p (equivalent as 'push').

References mln::p_queue< P >::push().

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

This set is always valid so it returns true.

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

Return the size of this site set in memory.

References mln::p_queue< P >::nsites().

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

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

Return the i-th site.

References mln::p_queue< P >::nsites().

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

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

Referenced by mln::p_queue< P >::pop_front(), and mln::geom::impl::seeds2tiling().

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

References mln::p_queue< P >::front(), and mln::p_queue< P >::pop().

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

Push a site p in the queue.

Referenced by mln::p_queue< P >::insert(), and mln::geom::impl::seeds2tiling().

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

Return the corresponding std::deque of sites.


Friends And Related Function Documentation

template<typename Sl, typename Sr>
p_set< typename Sl::site > diff ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Set theoretic difference of lhs and rhs.

template<typename Sl, typename Sr>
p_set< typename Sl::site > inter ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Intersection between a couple of point sets.

template<typename Sl, typename Sr>
bool operator< ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Strict inclusion test between site sets lhs and rhs.

Parameters:
[in] lhs A site set (strictly included?).
[in] rhs Another site set (includer?).

template<typename S>
std::ostream & operator<< ( std::ostream &  ostr,
const Site_Set< S > &  set 
) [related, inherited]

Print a site set set into the output stream ostr.

Parameters:
[in,out] ostr An output stream.
[in] set A site set.
Returns:
The modified output stream ostr.

template<typename Sl, typename Sr>
bool operator<= ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Inclusion test between site sets lhs and rhs.

Parameters:
[in] lhs A site set (included?).
[in] rhs Another site set (includer?).

template<typename Sl, typename Sr>
bool operator== ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Equality test between site sets lhs and rhs.

Parameters:
[in] lhs A site set.
[in] rhs Another site set.

template<typename Sl, typename Sr>
p_set< typename Sl::site > sym_diff ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Set theoretic symmetrical difference of lhs and rhs.

template<typename Sl, typename Sr>
p_set< typename Sl::site > uni ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Union of a couple of point sets.

template<typename S>
p_set< typename S::site > unique ( const Site_Set< S > &  s  )  [related, inherited]

Give the unique set of s.


Generated on Thu Sep 9 19:30:53 2010 for Milena (Olena) by  doxygen 1.5.6