Public Types | Public Member Functions | Protected Attributes | Private Types

mln::p_mutable_array_of< S > Class Template Reference
[Basic types]

p_mutable_array_of is a mutable array of site sets. More...

#include <p_mutable_array_of.hh>

Inheritance diagram for mln::p_mutable_array_of< S >:
Inheritance graph

List of all members.

Public Types

typedef p_double_piter< self_,
mln_bkd_eiter(array_),
typename S::bkd_piter > 
bkd_piter
 Backward Site_Iterator associated type.
typedef Site_Set< void > category
typedef S element
 Element associated type.
typedef p_mutable_array_of< S > exact_t
typedef p_double_piter< self_,
mln_fwd_eiter(array_),
typename S::fwd_piter > 
fwd_piter
 Forward Site_Iterator associated type.
typedef S i_element
 Insertion element associated type.
typedef fwd_piter piter
 Site_Iterator associated type.
typedef p_double_psite< self_,
element
psite
 Psite associated type.
typedef subject< S::site >::ret site
 Site associated type.

Public Member Functions

const util::array< S > & array_hook_ () const
 Hook to the set of runs.
void clear ()
 Clear this set.
bool has (const psite &p) const
 Test if p belongs to this point set.
void insert (const S &s)
 Insert a site set s.
bool is_empty () const
 Test if the site set is empty.
bool is_empty_ () const
 Test if the site set is empty.
bool is_valid () const
 Test this set validity so returns always true.
std::size_t memory_size () const
 Return the size of this site set in memory.
unsigned nelements () const
 Give the number of elements (site sets) of this composite.
S & operator[] (unsigned i)
 Return the i-th site set (mutable version).
const S & operator[] (unsigned i) const
 Return the i-th site set (const version).
 p_mutable_array_of ()
 Constructor without arguments.
void reserve (unsigned n)
 Reserve memory for n elements.
const util::array< S > & set_1_ () const
template<typename I >
const S & set_2_ (const I &it) const

Protected Attributes

util::array< S > arr_
 Array of site sets.

Private Types

typedef util::array< S > array_
typedef p_mutable_array_of< S > self_

Detailed Description

template<typename S>
class mln::p_mutable_array_of< S >

p_mutable_array_of is a mutable array of site sets.

Parameter S is the type of the contained site sets.

Definition at line 76 of file p_mutable_array_of.hh.


Member Typedef Documentation

template<typename S >
typedef util::array<S> mln::p_mutable_array_of< S >::array_ [private]

Definition at line 81 of file p_mutable_array_of.hh.

template<typename S >
typedef p_double_piter<self_, mln_bkd_eiter(array_), typename S ::bkd_piter> mln::p_mutable_array_of< S >::bkd_piter

Backward Site_Iterator associated type.

Definition at line 99 of file p_mutable_array_of.hh.

typedef Site_Set<void> mln::Site_Set< p_mutable_array_of< S > >::category [inherited]

Reimplemented from mln::Object< p_mutable_array_of< S > >.

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

template<typename S >
typedef S mln::p_mutable_array_of< S >::element

Element associated type.

Definition at line 85 of file p_mutable_array_of.hh.

typedef p_mutable_array_of< S > mln::Object< p_mutable_array_of< S > >::exact_t [inherited]

Definition at line 173 of file object.hh.

template<typename S >
typedef p_double_piter<self_, mln_fwd_eiter(array_), typename S ::fwd_piter> mln::p_mutable_array_of< S >::fwd_piter

Forward Site_Iterator associated type.

Definition at line 94 of file p_mutable_array_of.hh.

template<typename S >
typedef S mln::p_mutable_array_of< S >::i_element

Insertion element associated type.

Definition at line 121 of file p_mutable_array_of.hh.

template<typename S >
typedef fwd_piter mln::p_mutable_array_of< S >::piter

Site_Iterator associated type.

Definition at line 102 of file p_mutable_array_of.hh.

template<typename S >
typedef p_double_psite<self_, element> mln::p_mutable_array_of< S >::psite

Psite associated type.

Definition at line 89 of file p_mutable_array_of.hh.

template<typename S >
typedef p_mutable_array_of<S> mln::p_mutable_array_of< S >::self_ [private]

Definition at line 80 of file p_mutable_array_of.hh.

typedef subject<S::site >::ret mln::internal::site_set_base_< S::site , p_mutable_array_of< S > >::site [inherited]

Site associated type.

Definition at line 55 of file site_set_base.hh.


Constructor & Destructor Documentation

template<typename S >
mln::p_mutable_array_of< S >::p_mutable_array_of (  )  [inline]

Constructor without arguments.

Definition at line 175 of file p_mutable_array_of.hh.


Member Function Documentation

template<typename S >
const util::array< S > & mln::p_mutable_array_of< S >::array_hook_ (  )  const [inline]

Hook to the set of runs.

Definition at line 266 of file p_mutable_array_of.hh.

References mln::p_mutable_array_of< S >::arr_.

template<typename S >
void mln::p_mutable_array_of< S >::clear (  )  [inline]
template<typename S >
bool mln::p_mutable_array_of< S >::has ( const psite p  )  const [inline]
template<typename S >
void mln::p_mutable_array_of< S >::insert ( const S &  s  )  [inline]

Insert a site set s.

Precondition:
s is valid.

Definition at line 206 of file p_mutable_array_of.hh.

References mln::util::array< T >::append(), and mln::p_mutable_array_of< S >::arr_.

bool mln::internal::site_set_base_< S::site , p_mutable_array_of< S > >::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.

Referenced by mln::p_mutable_array_of< S >::clear().

template<typename S >
bool mln::p_mutable_array_of< S >::is_empty_ (  )  const [inline]
template<typename S >
bool mln::p_mutable_array_of< S >::is_valid (  )  const [inline]

Test this set validity so returns always true.

Definition at line 198 of file p_mutable_array_of.hh.

template<typename S >
std::size_t mln::p_mutable_array_of< S >::memory_size (  )  const [inline]

Return the size of this site set in memory.

Definition at line 258 of file p_mutable_array_of.hh.

References mln::p_mutable_array_of< S >::arr_, and mln::util::array< T >::memory_size().

template<typename S >
unsigned mln::p_mutable_array_of< S >::nelements (  )  const [inline]

Give the number of elements (site sets) of this composite.

Definition at line 233 of file p_mutable_array_of.hh.

References mln::p_mutable_array_of< S >::arr_, and mln::util::array< T >::nelements().

template<typename S >
const S & mln::p_mutable_array_of< S >::operator[] ( unsigned  i  )  const [inline]

Return the i-th site set (const version).

Definition at line 215 of file p_mutable_array_of.hh.

References mln::p_mutable_array_of< S >::arr_, and mln::util::array< T >::nelements().

template<typename S >
S & mln::p_mutable_array_of< S >::operator[] ( unsigned  i  )  [inline]

Return the i-th site set (mutable version).

Definition at line 224 of file p_mutable_array_of.hh.

References mln::p_mutable_array_of< S >::arr_, and mln::util::array< T >::nelements().

template<typename S >
void mln::p_mutable_array_of< S >::reserve ( unsigned  n  )  [inline]

Reserve memory for n elements.

Definition at line 182 of file p_mutable_array_of.hh.

References mln::p_mutable_array_of< S >::arr_, and mln::util::array< T >::reserve().

template<typename S >
const util::array< S > & mln::p_mutable_array_of< S >::set_1_ (  )  const [inline]

Definition at line 274 of file p_mutable_array_of.hh.

References mln::p_mutable_array_of< S >::arr_.

template<typename S >
template<typename I >
const S & mln::p_mutable_array_of< S >::set_2_ ( const I &  it  )  const [inline]

Definition at line 283 of file p_mutable_array_of.hh.


Member Data Documentation

template<typename S >
util::array<S> mln::p_mutable_array_of< S >::arr_ [protected]