$extrastylesheet
#include <mln/core/site_set/p_queue_fast.hh>
Public Member Functions | |
p_queue_fast () | |
void | clear () |
bool | compute_has (const P &p) const |
bool | empty () const |
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 () |
const P & | pop_front () |
void | purge () |
void | push (const P &p) |
void | reserve (typename p_array< P >::size_type n) |
const std::vector< P > & | std_vector () const |
Protected Attributes | |
unsigned | begin_ |
unsigned | end_ |
p_array< P > | q_ |
Public Types | |
typedef p_indexed_bkd_piter < self_ > | bkd_piter |
typedef Site_Set< void > | category |
typedef P | element |
typedef p_queue_fast< 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 |
Queue of sites class (based on p_array.
).
This container is efficient; FIXME: explain...
The parameter P
shall be a site or pseudo-site type.
Definition at line 72 of file p_queue_fast.hh.
mln::p_queue_fast< P >::p_queue_fast | ( | ) |
Constructor without argument.
void mln::p_queue_fast< P >::clear | ( | ) |
Clear the queue.
bool mln::p_queue_fast< P >::compute_has | ( | const P & | p | ) | const |
Test if p
belongs to this site set.
bool mln::p_queue_fast< P >::empty | ( | ) | const |
Test if the queue is empty.
const P& mln::p_queue_fast< P >::front | ( | ) | const |
Give the front site p
of the queue; p
is the least recently inserted site.
bool mln::p_queue_fast< P >::has | ( | const psite & | p | ) | const |
Test if p
belongs to this site set.
bool mln::p_queue_fast< P >::has | ( | const util::index & | i | ) | const |
Test if index i
belongs to this site set.
void mln::p_queue_fast< P >::insert | ( | const P & | p | ) |
Insert a site p
(equivalent as 'push').
|
inherited |
Test if the site set is empty.
This final method dispatches to is_empty_ whose default implementation relies on the 'nsites' method.
bool mln::p_queue_fast< P >::is_valid | ( | ) | const |
This set is always valid so it returns true.
std::size_t mln::p_queue_fast< P >::memory_size | ( | ) | const |
Return the size of this site set in memory.
unsigned mln::p_queue_fast< P >::nsites | ( | ) | const |
Give the number of sites.
const P& mln::p_queue_fast< P >::operator[] | ( | unsigned | i | ) | const |
Return the i-th
site.
void mln::p_queue_fast< P >::pop | ( | ) |
Pop (remove) the front site p
from the queue; p
is the least recently inserted site.
const P& mln::p_queue_fast< 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 mln::p_queue_fast< P >::purge | ( | ) |
Purge the queue to save (free) some memory.
void mln::p_queue_fast< P >::push | ( | const P & | p | ) |
Push a site p
in the queue.
void mln::p_queue_fast< P >::reserve | ( | typename p_array< P >::size_type | n | ) |
Reserve n
cells.
const std::vector<P>& mln::p_queue_fast< P >::std_vector | ( | ) | const |
Return the corresponding std::vector of sites.
|
protected |
Definition at line 160 of file p_queue_fast.hh.
|
protected |
Definition at line 161 of file p_queue_fast.hh.
|
protected |
Definition at line 159 of file p_queue_fast.hh.
typedef p_indexed_bkd_piter<self_> mln::p_queue_fast< P >::bkd_piter |
Backward Site_Iterator associated type.
Definition at line 87 of file p_queue_fast.hh.
|
inherited |
Definition at line 74 of file core/concept/site_set.hh.
typedef P mln::p_queue_fast< P >::element |
Element associated type.
Definition at line 78 of file p_queue_fast.hh.
|
inherited |
typedef p_indexed_fwd_piter<self_> mln::p_queue_fast< P >::fwd_piter |
Forward Site_Iterator associated type.
Definition at line 84 of file p_queue_fast.hh.
typedef P mln::p_queue_fast< P >::i_element |
Insertion element associated type.
Definition at line 121 of file p_queue_fast.hh.
typedef fwd_piter mln::p_queue_fast< P >::piter |
Site_Iterator associated type.
Definition at line 90 of file p_queue_fast.hh.
typedef p_indexed_psite<self_> mln::p_queue_fast< P >::psite |
Psite associated type.
Definition at line 81 of file p_queue_fast.hh.
|
inherited |
Site associated type.
Definition at line 58 of file site_set_base.hh.