Site set based on an image of Booleans. More...
#include <p_image.hh>
Public Types | |
typedef S::bkd_piter | bkd_piter |
Backward Site_Iterator associated type. | |
typedef Site_Set< void > | category |
typedef I::psite | element |
Element associated type. | |
typedef p_image< I > | exact_t |
typedef S::fwd_piter | fwd_piter |
Forward Site_Iterator associated type. | |
typedef psite | i_element |
Insertion element associated type. | |
typedef S::piter | piter |
Site_Iterator associated type. | |
typedef I::psite | psite |
Psite associated type. | |
typedef psite | r_element |
Removal element associated type. | |
typedef internal::p_image_site_set< I > ::ret | S |
Equivalent site_set type. | |
typedef subject< I::psite >::ret | site |
Site associated type. | |
Public Member Functions | |
void | clear () |
Clear this set. | |
bool | has (const psite &) const |
Test is the psite p belongs to this site set. | |
const I & | image_hook_ () const |
Hook to the image. | |
void | insert (const psite &p) |
Insert a site p . | |
bool | is_empty () const |
Test if the site set is empty. | |
bool | is_valid () const |
Test if this site set is valid, i.e., initialized. | |
std::size_t | memory_size () const |
Return the size of this site set in memory. | |
unsigned | nsites () const |
Give the number of sites. | |
operator typename internal::p_image_site_set< I >::ret () const | |
Conversion towards the equivalent site set. | |
p_image () | |
Constructor without argument. | |
p_image (const I &ima) | |
Constructor. | |
void | remove (const psite &p) |
Remove a site p . | |
void | toggle (const psite &p) |
Change the status in/out of a site p . | |
Private Attributes | |
I | ima_ |
unsigned | nsites_ |
Site set based on an image of Booleans.
typedef S ::bkd_piter mln::p_image< I >::bkd_piter |
Backward Site_Iterator associated type.
typedef Site_Set<void> mln::Site_Set< p_image< I > >::category [inherited] |
Reimplemented from mln::Object< p_image< I > >.
typedef I ::psite mln::p_image< I >::element |
Element associated type.
typedef p_image< I > mln::Object< p_image< I > >::exact_t [inherited] |
typedef S ::fwd_piter mln::p_image< I >::fwd_piter |
Forward Site_Iterator associated type.
typedef psite mln::p_image< I >::i_element |
Insertion element associated type.
typedef S ::piter mln::p_image< I >::piter |
Site_Iterator associated type.
typedef I ::psite mln::p_image< I >::psite |
Psite associated type.
typedef psite mln::p_image< I >::r_element |
Removal element associated type.
typedef internal::p_image_site_set<I>::ret mln::p_image< I >::S |
Equivalent site_set type.
typedef subject<I::psite >::ret mln::internal::site_set_base_< I::psite , p_image< I > >::site [inherited] |
Site associated type.
mln::p_image< I >::p_image | ( | ) | [inline] |
Constructor without argument.
mln::p_image< I >::p_image | ( | const I & | ima | ) | [inline] |
Constructor.
References mln::p_image< I >::clear().
void mln::p_image< I >::clear | ( | ) | [inline] |
Clear this set.
References mln::data::fill_with_value(), and mln::p_image< I >::is_valid().
Referenced by mln::p_image< I >::p_image().
bool mln::p_image< I >::has | ( | const psite & | p | ) | const [inline] |
Test is the psite p
belongs to this site set.
References mln::p_image< I >::ima_, and mln::p_image< I >::is_valid().
const I & mln::p_image< I >::image_hook_ | ( | ) | const [inline] |
Hook to the image.
References mln::p_image< I >::is_valid().
void mln::p_image< I >::insert | ( | const psite & | p | ) | [inline] |
Insert a site p
.
References mln::p_image< I >::ima_, and mln::p_image< I >::is_valid().
bool mln::internal::site_set_base_< I::psite , p_image< I > >::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.
bool mln::p_image< I >::is_valid | ( | ) | const [inline] |
Test if this site set is valid, i.e., initialized.
Referenced by mln::p_image< I >::clear(), mln::p_image< I >::has(), mln::p_image< I >::image_hook_(), mln::p_image< I >::insert(), mln::p_image< I >::memory_size(), mln::p_image< I >::remove(), and mln::p_image< I >::toggle().
std::size_t mln::p_image< I >::memory_size | ( | ) | const [inline] |
Return the size of this site set in memory.
References mln::p_image< I >::is_valid().
unsigned mln::p_image< I >::nsites | ( | ) | const [inline] |
Give the number of sites.
mln::p_image< I >::operator typename internal::p_image_site_set< I >::ret | ( | ) | const [inline] |
Conversion towards the equivalent site set.
References mln::pw::cst(), and mln::pw::value().
void mln::p_image< I >::remove | ( | const psite & | p | ) | [inline] |
Remove a site p
.
References mln::p_image< I >::ima_, and mln::p_image< I >::is_valid().
void mln::p_image< I >::toggle | ( | const psite & | p | ) | [inline] |
Change the status in/out of a site p
.
References mln::p_image< I >::ima_, and mln::p_image< I >::is_valid().
I mln::p_image< I >::ima_ [private] |
unsigned mln::p_image< I >::nsites_ [private] |