mln::p_image< I > Class Template Reference
[Sparse types]

Site set based on an image of Booleans. More...

#include <p_image.hh>

Inheritance diagram for mln::p_image< I >:

Inheritance graph

List of all members.

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 E 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< P >::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 (const I &ima)
 Constructor.
 p_image ()
 Constructor without argument.
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

ima_
unsigned nsites_

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::siteunique (const Site_Set< S > &s)
 Give the unique set of s.


Detailed Description

template<typename I>
class mln::p_image< I >

Site set based on an image of Booleans.

Definition at line 88 of file p_image.hh.


Member Typedef Documentation

template<typename I>
typedef S ::bkd_piter mln::p_image< I >::bkd_piter

Backward Site_Iterator associated type.

Definition at line 110 of file p_image.hh.

template<typename E>
typedef Site_Set<void> mln::Site_Set< E >::category [inherited]

Reimplemented from mln::Object< E >.

Definition at line 67 of file mln/core/concept/site_set.hh.

template<typename I>
typedef I ::psite mln::p_image< I >::element

Element associated type.

Definition at line 100 of file p_image.hh.

template<typename E>
typedef E mln::Object< E >::exact_t [inherited]

Definition at line 172 of file object.hh.

template<typename I>
typedef S ::fwd_piter mln::p_image< I >::fwd_piter

Forward Site_Iterator associated type.

Definition at line 107 of file p_image.hh.

template<typename I>
typedef psite mln::p_image< I >::i_element

Insertion element associated type.

Definition at line 136 of file p_image.hh.

template<typename I>
typedef S ::piter mln::p_image< I >::piter

Site_Iterator associated type.

Definition at line 113 of file p_image.hh.

template<typename I>
typedef I ::psite mln::p_image< I >::psite

Psite associated type.

Definition at line 104 of file p_image.hh.

template<typename I>
typedef psite mln::p_image< I >::r_element

Removal element associated type.

Definition at line 142 of file p_image.hh.

template<typename I>
typedef internal::p_image_site_set<I>::ret mln::p_image< I >::S

Equivalent site_set type.

Definition at line 93 of file p_image.hh.

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


Constructor & Destructor Documentation

template<typename I>
mln::p_image< I >::p_image (  )  [inline]

Constructor without argument.

Definition at line 182 of file p_image.hh.

template<typename I>
mln::p_image< I >::p_image ( const I &  ima  )  [inline]

Constructor.

Definition at line 189 of file p_image.hh.

References mln::p_image< I >::clear().


Member Function Documentation

template<typename I>
void mln::p_image< I >::clear (  )  [inline]

Clear this set.

Definition at line 283 of file p_image.hh.

References mln::data::fill_with_value(), and mln::p_image< I >::is_valid().

Referenced by mln::p_image< I >::p_image().

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

Test is the psite p belongs to this site set.

Definition at line 199 of file p_image.hh.

References mln::p_image< I >::ima_, and mln::p_image< I >::is_valid().

template<typename I>
const I & mln::p_image< I >::image_hook_ (  )  const [inline]

Hook to the image.

Definition at line 294 of file p_image.hh.

References mln::p_image< I >::is_valid().

template<typename I>
void mln::p_image< I >::insert ( const psite p  )  [inline]

Insert a site p.

Definition at line 224 of file p_image.hh.

References mln::p_image< I >::ima_, and mln::p_image< I >::is_valid().

template<typename P, typename E>
bool mln::internal::site_set_base_< P, E >::is_empty (  )  const [inline, inherited]

template<typename I>
bool mln::p_image< I >::is_valid (  )  const [inline]

template<typename I>
std::size_t mln::p_image< I >::memory_size (  )  const [inline]

Return the size of this site set in memory.

Definition at line 273 of file p_image.hh.

References mln::p_image< I >::is_valid().

template<typename I>
unsigned mln::p_image< I >::nsites (  )  const [inline]

Give the number of sites.

Definition at line 216 of file p_image.hh.

template<typename I>
mln::p_image< I >::operator typename internal::p_image_site_set< I >::ret (  )  const [inline]

Conversion towards the equivalent site set.

Definition at line 174 of file p_image.hh.

References mln::pw::cst(), and mln::pw::value().

template<typename I>
void mln::p_image< I >::remove ( const psite p  )  [inline]

Remove a site p.

Definition at line 237 of file p_image.hh.

References mln::p_image< I >::ima_, and mln::p_image< I >::is_valid().

template<typename I>
void mln::p_image< I >::toggle ( const psite p  )  [inline]

Change the status in/out of a site p.

Definition at line 251 of file p_image.hh.

References mln::p_image< I >::ima_, and mln::p_image< I >::is_valid().


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.

Definition at line 66 of file set/diff.hh.

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.

Definition at line 62 of file set/inter.hh.

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?).

Definition at line 479 of file operators.hh.

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.

Definition at line 505 of file operators.hh.

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?).

Definition at line 491 of file operators.hh.

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.

Definition at line 467 of file operators.hh.

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.

Definition at line 65 of file sym_diff.hh.

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.

Definition at line 61 of file uni.hh.

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

Give the unique set of s.

Definition at line 61 of file unique.hh.


Member Data Documentation

template<typename I>
I mln::p_image< I >::ima_ [private]

template<typename I>
unsigned mln::p_image< I >::nsites_ [private]

Definition at line 166 of file p_image.hh.


Generated on Sun Apr 25 01:56:32 2010 for Milena (Olena) by  doxygen 1.5.6