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

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

#include <p_image.hh>

Inherits mln::internal::site_set_base_< I::psite, mln::p_image< I > >.

List of all members.

Public Types

typedef S::bkd_piter bkd_piter
 Backward Site_Iterator associated type.
typedef I::psite element
 Element associated type.
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.

Public Member Functions

void clear ()
 Clear this set.
bool has (const psite &) const
 Test is the psite p belongs to this site set.
void insert (const psite &p)
 Insert a site p.
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.

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.


Detailed Description

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

Site set based on an image of Booleans.

Member Typedef Documentation

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

Backward Site_Iterator associated type.

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

Element associated type.

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

Forward Site_Iterator associated type.

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

Insertion element associated type.

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

Site_Iterator associated type.

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

Psite associated type.

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

Removal element associated type.

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

Equivalent site_set type.


Constructor & Destructor Documentation

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

Constructor without argument.

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

Constructor.

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


Member Function Documentation

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

template<typename I>
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 >::is_valid().

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

Insert a site p.

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

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.

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

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

Give the number of sites.

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

Conversion towards the equivalent site set.

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

Remove a site p.

References 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.

References 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.

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.

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

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.

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

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.

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.

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.

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

Give the unique set of s.


Generated on Thu Sep 9 19:30:52 2010 for Milena (Olena) by  doxygen 1.5.6