Priority queue class.
More...
#include <p_key.hh>
Inherits mln::internal::site_set_base_< P, p_key< K, P > >.
|
void | change_key (const K &k, const K &new_k) |
| Change the key k into a new value new_k .
|
|
template<typename F > |
void | change_keys (const Function_v2v< F > &f) |
| Change the keys by applying the function f .
|
|
void | clear () |
| Clear this site set.
|
|
bool | exists_key (const K &key) const |
| Test if the priority exists.
|
|
bool | has (const psite &) const |
| Test is the psite p belongs to this site set.
|
|
bool | has (const P &p) const |
| Test is the psite p belongs to this site set.
|
|
void | insert (const i_element &k_p) |
| Insert a pair k_p (key k, site p).
|
|
void | insert (const K &k, const P &p) |
| Insert a pair (key k , site p ).
|
|
bool | is_valid () const |
| Test this set validity so returns always true.
|
|
const K & | key (const P &p) const |
| Give the key associated with site p .
|
|
const util::set< K > & | keys () const |
| Give the set of keys.
|
|
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_set< P > & | operator() (const K &key) const |
| Give the queue with the priority priority .
|
|
| p_key () |
| Constructor.
|
|
void | remove (const P &p) |
| Remove a site p .
|
|
void | remove_key (const K &k) |
| Remove all sites with key k .
|
|
template<typename K, typename P>
class mln::p_key< K, P >
Priority queue class.
Definition at line 72 of file p_key.hh.
template<typename K , typename P >
template<typename K , typename P >
Element associated type.
Definition at line 79 of file p_key.hh.
template<typename K , typename P >
template<typename K , typename P >
Insertion element associated type.
Definition at line 118 of file p_key.hh.
template<typename K , typename P >
template<typename K , typename P >
Psite associated type.
Definition at line 83 of file p_key.hh.
template<typename K , typename P >
Removal element associated type.
Definition at line 132 of file p_key.hh.
template<typename K , typename P >
template<typename K , typename P >
void p_key< K, P >::change_key |
( |
const K & |
k, |
|
|
const K & |
new_k |
|
) |
| |
|
inline |
template<typename K , typename P >
template<typename F >
template<typename K , typename P >
void p_key< K, P >::clear |
( |
| ) |
|
|
inline |
Clear this site set.
Definition at line 462 of file p_key.hh.
template<typename K , typename P >
bool p_key< K, P >::exists_key |
( |
const K & |
key | ) |
const |
|
inline |
Test if the priority
exists.
Definition at line 520 of file p_key.hh.
template<typename K , typename P >
Test is the psite p
belongs to this site set.
Definition at line 217 of file p_key.hh.
template<typename K , typename P >
bool p_key< K, P >::has |
( |
const P & |
p | ) |
const |
|
inline |
Test is the psite p
belongs to this site set.
Definition at line 227 of file p_key.hh.
template<typename K , typename P >
Insert a pair k_p
(key k, site p).
Definition at line 301 of file p_key.hh.
template<typename K , typename P >
void p_key< K, P >::insert |
( |
const K & |
k, |
|
|
const P & |
p |
|
) |
| |
|
inline |
Insert a pair (key k
, site p
).
Definition at line 268 of file p_key.hh.
template<typename K , typename P >
bool p_key< K, P >::is_valid |
( |
| ) |
const |
|
inline |
Test this set validity so returns always true.
Definition at line 236 of file p_key.hh.
template<typename K , typename P >
const K & p_key< K, P >::key |
( |
const P & |
p | ) |
const |
|
inline |
Give the key associated with site p
.
Definition at line 501 of file p_key.hh.
template<typename K , typename P >
Give the set of keys.
Definition at line 511 of file p_key.hh.
template<typename K , typename P >
std::size_t p_key< K, P >::memory_size |
( |
| ) |
const |
|
inline |
Return the size of this site set in memory.
Definition at line 475 of file p_key.hh.
template<typename K , typename P >
unsigned p_key< K, P >::nsites |
( |
| ) |
const |
|
inline |
Give the number of sites.
Definition at line 245 of file p_key.hh.
template<typename K , typename P >
const p_set< P > & p_key< K, P >::operator() |
( |
const K & |
key | ) |
const |
|
inline |
Give the queue with the priority priority
.
This method always works: if the priority is not in this set, an empty queue is returned.
Definition at line 489 of file p_key.hh.
template<typename K , typename P >
void p_key< K, P >::remove |
( |
const P & |
p | ) |
|
|
inline |
Remove a site p
.
Definition at line 309 of file p_key.hh.
template<typename K , typename P >
void p_key< K, P >::remove_key |
( |
const K & |
k | ) |
|
|
inline |