#include <p_key.hh>
Public Types | |
typedef p_double_piter< self_, mln_bkd_eiter(util::set< K > ), typename p_set< P > ::bkd_piter > | bkd_piter |
Backward Site_Iterator associated type. | |
typedef Site_Set< void > | category |
typedef P | element |
Element associated type. | |
typedef E | exact_t |
typedef p_double_piter< self_, mln_fwd_eiter(util::set< K > ), typename p_set< P > ::fwd_piter > | fwd_piter |
Forward Site_Iterator associated type. | |
typedef std::pair< K, P > | i_element |
Insertion element associated type. | |
typedef fwd_piter | piter |
Site_Iterator associated type. | |
typedef p_double_psite< self_, p_set< P > > | psite |
Psite associated type. | |
typedef P | r_element |
Removal element associated type. | |
typedef subject< P >::ret | site |
Site associated type. | |
Public Member Functions | |
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 P &p) const |
Test is the psite p belongs to this site set. | |
bool | has (const psite &) const |
Test is the psite p belongs to this site set. | |
void | insert (const K &k, const P &p) |
Insert a pair (key k , site p ). | |
void | insert (const i_element &k_p) |
Insert a pair k_p (key k, site p). | |
bool | is_empty () const |
Test if the site set is empty. | |
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 . | |
const util::set< K > & | set_1_ () const |
const p_set< P > & | set_2_ (const K &key) const |
void | unsafe_insert_ (const K &k, const P &p) |
Protected Types | |
typedef std::map< P, K, util::ord< P > > | k_t |
typedef std::map< K, p_set< P > , util::ord< K > > | s_t |
Protected Member Functions | |
bool | run_ () const |
Protected Attributes | |
util::set< K > | b_ |
k_t | k_ |
unsigned | n_ |
s_t | s_ |
Private Types | |
typedef p_key< K, P > | self_ |
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 . |
Definition at line 72 of file p_key.hh.
typedef p_double_piter<self_, mln_bkd_eiter(util::set<K>), typename p_set<P>::bkd_piter> mln::p_key< K, P >::bkd_piter |
typedef Site_Set<void> mln::Site_Set< E >::category [inherited] |
typedef P mln::p_key< K, P >::element |
typedef E mln::Object< E >::exact_t [inherited] |
typedef p_double_piter<self_, mln_fwd_eiter(util::set<K>), typename p_set<P>::fwd_piter> mln::p_key< K, P >::fwd_piter |
typedef std::pair<K,P> mln::p_key< K, P >::i_element |
typedef std::map<P, K, util::ord<P> > mln::p_key< K, P >::k_t [protected] |
typedef fwd_piter mln::p_key< K, P >::piter |
typedef p_double_psite< self_, p_set<P> > mln::p_key< K, P >::psite |
typedef P mln::p_key< K, P >::r_element |
typedef std::map<K, p_set<P>, util::ord<K> > mln::p_key< K, P >::s_t [protected] |
typedef p_key<K,P> mln::p_key< K, P >::self_ [private] |
typedef subject<P>::ret mln::internal::site_set_base_< P, E >::site [inherited] |
Site associated type.
Reimplemented in mln::p_centered< W >.
Definition at line 55 of file site_set_base.hh.
mln::p_key< K, P >::p_key | ( | ) | [inline] |
Constructor.
Definition at line 208 of file p_key.hh.
References mln::p_key< K, P >::n_, and mln::p_key< K, P >::run_().
void mln::p_key< K, P >::change_key | ( | const K & | k, | |
const K & | new_k | |||
) | [inline] |
Change the key k
into a new value new_k
.
Definition at line 382 of file p_key.hh.
References mln::p_key< K, P >::b_, mln::util::set< T >::insert(), mln::p_key< K, P >::k_, mln::p_key< K, P >::n_, mln::p_set< P >::nsites(), mln::util::set< T >::remove(), mln::p_key< K, P >::run_(), and mln::p_key< K, P >::s_.
void mln::p_key< K, P >::change_keys | ( | const Function_v2v< F > & | f | ) | [inline] |
Change the keys by applying the function f
.
Definition at line 428 of file p_key.hh.
References mln::p_key< K, P >::b_, mln::exact(), mln::util::set< T >::insert(), mln::p_key< K, P >::k_, mln::p_key< K, P >::run_(), and mln::p_key< K, P >::s_.
void mln::p_key< K, P >::clear | ( | ) | [inline] |
Clear this site set.
Definition at line 462 of file p_key.hh.
References mln::p_key< K, P >::b_, mln::util::set< T >::clear(), mln::p_key< K, P >::k_, mln::p_key< K, P >::n_, mln::p_key< K, P >::run_(), and mln::p_key< K, P >::s_.
bool mln::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.
References mln::p_key< K, P >::b_, mln::util::set< T >::has(), and mln::p_key< K, P >::run_().
Referenced by mln::p_key< K, P >::operator()().
bool mln::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.
References mln::p_key< K, P >::k_, and mln::p_key< K, P >::run_().
bool mln::p_key< K, P >::has | ( | const psite & | ) | const [inline] |
Test is the psite p
belongs to this site set.
Definition at line 217 of file p_key.hh.
References mln::p_key< K, P >::run_().
Referenced by mln::p_key< K, P >::insert().
void mln::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.
References mln::p_key< K, P >::b_, mln::p_key< K, P >::has(), mln::util::set< T >::has(), mln::util::set< T >::insert(), mln::p_key< K, P >::k_, mln::p_key< K, P >::n_, mln::p_key< K, P >::run_(), and mln::p_key< K, P >::s_.
void mln::p_key< K, P >::insert | ( | const i_element & | k_p | ) | [inline] |
bool mln::internal::site_set_base_< P, E >::is_empty | ( | ) | const [inline, inherited] |
Test if the site set is empty.
This final method dispatches to is_empty_ whose default implementation relies on the 'nsites' method.
Definition at line 84 of file site_set_base.hh.
References mln::exact().
Referenced by mln::canvas::labeling::impl::generic::blobs(), mln::p_set_of< S >::clear(), mln::p_mutable_array_of< S >::clear(), mln::p_array< P >::clear(), mln::canvas::impl::generic::distance_geodesic(), mln::morpho::watershed::impl::generic::flooding(), mln::morpho::watershed::impl::flooding_fastest(), mln::p_queue_fast< P >::front(), mln::p_queue< P >::front(), mln::p_priority< P, Q >::front(), mln::p_priority< P, Q >::highest_priority(), mln::registration::icp(), mln::influence_zones(), mln::p_priority< P, Q >::lowest_priority(), mln::morpho::meyer_wst(), mln::p_queue_fast< P >::pop(), mln::p_queue< P >::pop(), mln::p_priority< P, Q >::pop(), mln::p_queue_fast< P >::pop_front(), mln::p_queue< P >::pop_front(), mln::p_priority< P, Q >::pop_front(), mln::registration::internal::registration_tests(), mln::geom::impl::seeds2tiling(), mln::geom::impl::seeds2tiling_roundness(), mln::morpho::skeleton_constrained(), and mln::morpho::watershed::topological().
bool mln::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.
References mln::p_key< K, P >::run_().
const K & mln::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.
References mln::p_key< K, P >::k_, and mln::p_key< K, P >::run_().
Referenced by mln::p_key< K, P >::run_().
const util::set< K > & mln::p_key< K, P >::keys | ( | ) | const [inline] |
Give the set of keys.
Definition at line 511 of file p_key.hh.
References mln::p_key< K, P >::b_, and mln::p_key< K, P >::run_().
std::size_t mln::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.
References mln::p_key< K, P >::run_().
unsigned mln::p_key< K, P >::nsites | ( | ) | const [inline] |
Give the number of sites.
Definition at line 245 of file p_key.hh.
References mln::p_key< K, P >::n_, and mln::p_key< K, P >::run_().
const p_set< P > & mln::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.
References mln::p_key< K, P >::exists_key(), and mln::p_key< K, P >::s_.
void mln::p_key< K, P >::remove | ( | const P & | p | ) | [inline] |
Remove a site p
.
Definition at line 309 of file p_key.hh.
References mln::p_key< K, P >::b_, mln::util::set< T >::has(), mln::p_key< K, P >::k_, mln::p_key< K, P >::n_, mln::util::set< T >::remove(), mln::p_key< K, P >::run_(), and mln::p_key< K, P >::s_.
void mln::p_key< K, P >::remove_key | ( | const K & | k | ) | [inline] |
Remove all sites with key k
.
Definition at line 351 of file p_key.hh.
References mln::p_key< K, P >::b_, mln::p_key< K, P >::k_, mln::p_key< K, P >::n_, mln::p_set< P >::nsites(), mln::util::set< T >::remove(), mln::p_key< K, P >::run_(), and mln::p_key< K, P >::s_.
bool mln::p_key< K, P >::run_ | ( | ) | const [inline, protected] |
Definition at line 546 of file p_key.hh.
References mln::p_key< K, P >::b_, mln::implies(), mln::util::set< T >::is_empty(), mln::p_key< K, P >::k_, mln::p_key< K, P >::key(), mln::p_key< K, P >::n_, mln::util::set< T >::nelements(), mln::p_set< P >::nsites(), and mln::p_key< K, P >::s_.
Referenced by mln::p_key< K, P >::change_key(), mln::p_key< K, P >::change_keys(), mln::p_key< K, P >::clear(), mln::p_key< K, P >::exists_key(), mln::p_key< K, P >::has(), mln::p_key< K, P >::insert(), mln::p_key< K, P >::is_valid(), mln::p_key< K, P >::key(), mln::p_key< K, P >::keys(), mln::p_key< K, P >::memory_size(), mln::p_key< K, P >::nsites(), mln::p_key< K, P >::p_key(), mln::p_key< K, P >::remove(), mln::p_key< K, P >::remove_key(), and mln::p_key< K, P >::unsafe_insert_().
const util::set< K > & mln::p_key< K, P >::set_1_ | ( | ) | const [inline] |
const p_set< P > & mln::p_key< K, P >::set_2_ | ( | const K & | key | ) | const [inline] |
Definition at line 537 of file p_key.hh.
References mln::p_key< K, P >::b_, mln::util::set< T >::has(), and mln::p_key< K, P >::s_.
void mln::p_key< K, P >::unsafe_insert_ | ( | const K & | k, | |
const P & | p | |||
) | [inline] |
Definition at line 255 of file p_key.hh.
References mln::p_key< K, P >::b_, mln::util::set< T >::insert(), mln::p_key< K, P >::k_, mln::p_key< K, P >::n_, mln::p_key< K, P >::run_(), and mln::p_key< K, P >::s_.
bool operator< | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
std::ostream & operator<< | ( | std::ostream & | ostr, | |
const Site_Set< S > & | set | |||
) | [related, inherited] |
bool operator<= | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
bool operator== | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
util::set<K> mln::p_key< K, P >::b_ [protected] |
Definition at line 180 of file p_key.hh.
Referenced by mln::p_key< K, P >::change_key(), mln::p_key< K, P >::change_keys(), mln::p_key< K, P >::clear(), mln::p_key< K, P >::exists_key(), mln::p_key< K, P >::insert(), mln::p_key< K, P >::keys(), mln::p_key< K, P >::remove(), mln::p_key< K, P >::remove_key(), mln::p_key< K, P >::run_(), mln::p_key< K, P >::set_1_(), mln::p_key< K, P >::set_2_(), and mln::p_key< K, P >::unsafe_insert_().
k_t mln::p_key< K, P >::k_ [protected] |
Definition at line 188 of file p_key.hh.
Referenced by mln::p_key< K, P >::change_key(), mln::p_key< K, P >::change_keys(), mln::p_key< K, P >::clear(), mln::p_key< K, P >::has(), mln::p_key< K, P >::insert(), mln::p_key< K, P >::key(), mln::p_key< K, P >::remove(), mln::p_key< K, P >::remove_key(), mln::p_key< K, P >::run_(), and mln::p_key< K, P >::unsafe_insert_().
unsigned mln::p_key< K, P >::n_ [protected] |
Definition at line 191 of file p_key.hh.
Referenced by mln::p_key< K, P >::change_key(), mln::p_key< K, P >::clear(), mln::p_key< K, P >::insert(), mln::p_key< K, P >::nsites(), mln::p_key< K, P >::p_key(), mln::p_key< K, P >::remove(), mln::p_key< K, P >::remove_key(), mln::p_key< K, P >::run_(), and mln::p_key< K, P >::unsafe_insert_().
s_t mln::p_key< K, P >::s_ [protected] |
Definition at line 184 of file p_key.hh.
Referenced by mln::p_key< K, P >::change_key(), mln::p_key< K, P >::change_keys(), mln::p_key< K, P >::clear(), mln::p_key< K, P >::insert(), mln::p_key< K, P >::operator()(), mln::p_key< K, P >::remove(), mln::p_key< K, P >::remove_key(), mln::p_key< K, P >::run_(), mln::p_key< K, P >::set_2_(), and mln::p_key< K, P >::unsafe_insert_().