#include <graph_window_piter.hh>
Public Types | |
typedef Site_Proxy< void > | category |
typedef E | exact_t |
typedef S::site | site |
The associated site type (as a Site_Proxy). | |
typedef S | target |
The associated target type. | |
typedef W::center_t | center_t |
Type of the window center. | |
typedef W::graph_element | graph_element |
Type of the graph element pointed by this iterator. | |
typedef S::fun_t::result | P |
Associated types
Type of the window elements. | |
Public Member Functions | |
const C & | center () const |
The psite around which this iterator moves. | |
template<typename P> | |
void | center_at (const P &c) |
void | change_target (const S &s) |
Change the site set targeted by this iterator. | |
void | change_target_site_set (const S &s) |
Change the target site set. | |
void | do_start_ () |
void | invalidate () |
bool | is_valid () const |
void | next () |
Go to the next element. | |
void | next_ () |
Go to the next point. | |
const S::psite & | p_hook_ () const |
Hook to the current location. | |
const S & | site_set () const |
Give the site set (neighborhood or window) that this iterator browses. | |
void | start () |
void | start_ () |
Start an iteration. | |
const S::psite & | subj_ () |
This overriding is very useful: it adds a test to prevent getting an invalid iterator when its center has moved. | |
const S *& | target_ () |
Give the target address. It might be 0. | |
const S & | target_site_set () const |
Return the target site set. | |
const S::site & | to_site () const |
Return the site it points to (as a Site_Proxy). | |
E & | update () |
Warning: this method is an advanced tool provided for very special occasions; if you are a regular user, you should never use it! Calling this method forces this relative iterator to synchronize with its center when it has just moved and when the relative iterator still makes sense. | |
template<typename S2, typename I2> | |
void | center_at_ (const p_graph_piter< S2, I2 > &c) |
Do some work while setting the reference site. | |
template<typename Pref> | |
void | center_at_ (const Pref &c) |
Do some work while setting the reference site. | |
W::psite | compute_p_ () const |
Compute the current psite. | |
void | do_next_ () |
Go to the next point. | |
const graph_element & | element () const |
Return the graph element pointed by this iterator. | |
unsigned | id () const |
Return the graph element id. | |
void | invalidate_ () |
Invalidate the iterator. | |
bool | is_valid_ () const |
Manipulation. | |
template<typename Pref> | |
graph_window_piter (const Window< W > &win, const Site_Set< S > &target_site_set, const Pref &p_ref) | |
To be used in case center and neighbors sites do not have the same type and do not belong to the same site set. | |
template<typename Pref> | |
graph_window_piter (const Window< W > &win, const Pref &p_ref) | |
To be used in case the center and neighbor sites have the same type and belong to the same site set. | |
graph_window_piter () | |
Construction. | |
template<typename Pref> | |
void | init_ (const Window< W > &win, const Site_Set< S > &target_site_set, const Pref &p_ref) |
template<typename Pref> | |
void | init_ (const Window< W > &win, const Pref &p_ref) |
Delayed initialization. | |
Protected Attributes | |
const C * | c_ |
A pointer to the center psite around which this iterator moves. | |
Private Types | |
typedef graph_window_piter< S, W, I > | self_ |
typedef internal::site_relative_iterator_base < W, self_, typename S::psite > | super_ |
typedef internal::impl_selector < typename W::center_t, typename W::psite, graph_window_piter< S, W, I > > | super_impl_ |
Private Attributes | |
I | iter_ |
const S * | s_ |
The target. | |
Friends | |
class | internal::impl_selector< typename W::center_t, typenameW::psite, graph_window_piter< S, W, I > > |
S | is the site set type. | |
W | is the window type. | |
I | is the underlying iterator type. |
Definition at line 99 of file graph_window_piter.hh.
typedef Site_Proxy<void> mln::Site_Proxy< E >::category [inherited] |
Reimplemented from mln::Proxy< E >.
Reimplemented in mln::Pseudo_Site< E >, mln::Pseudo_Site< mln::p_run_psite< P > >, mln::Pseudo_Site< mln::p_indexed_psite< S > >, mln::Pseudo_Site< mln::p_vertices_psite< G, F > >, mln::Pseudo_Site< mln::faces_psite< N, D, P > >, mln::Pseudo_Site< mln::complex_psite< D, G > >, mln::Pseudo_Site< mln::p_double_psite< S, Sp > >, and mln::Pseudo_Site< mln::p_edges_psite< G, F > >.
Definition at line 63 of file site_proxy.hh.
typedef W::center_t mln::graph_window_piter< S, W, I >::center_t |
typedef E mln::Object< E >::exact_t [inherited] |
typedef W::graph_element mln::graph_window_piter< S, W, I >::graph_element |
Type of the graph element pointed by this iterator.
Definition at line 122 of file graph_window_piter.hh.
typedef S::fun_t ::result mln::graph_window_piter< S, W, I >::P |
typedef graph_window_piter<S,W,I> mln::graph_window_piter< S, W, I >::self_ [private] |
Definition at line 106 of file graph_window_piter.hh.
typedef S ::site mln::internal::site_iterator_base< S, E >::site [inherited] |
typedef internal::site_relative_iterator_base<W,self_,typename S ::psite> mln::graph_window_piter< S, W, I >::super_ [private] |
Reimplemented from mln::internal::site_iterator_base< S, E >.
Definition at line 108 of file graph_window_piter.hh.
typedef internal::impl_selector<typename W::center_t, typename W ::psite, graph_window_piter<S,W,I> > mln::graph_window_piter< S, W, I >::super_impl_ [private] |
Definition at line 111 of file graph_window_piter.hh.
typedef S mln::internal::site_iterator_base< S, E >::target [inherited] |
mln::graph_window_piter< S, W, I >::graph_window_piter | ( | ) | [inline] |
mln::graph_window_piter< S, W, I >::graph_window_piter | ( | const Window< W > & | win, | |
const Pref & | p_ref | |||
) | [inline] |
To be used in case the center and neighbor sites have the same type and belong to the same site set.
Definition at line 235 of file graph_window_piter.hh.
References mln::graph_window_piter< S, W, I >::init_().
mln::graph_window_piter< S, W, I >::graph_window_piter | ( | const Window< W > & | win, | |
const Site_Set< S > & | target_site_set, | |||
const Pref & | p_ref | |||
) | [inline] |
To be used in case center and neighbors sites do not have the same type and do not belong to the same site set.
win | The underlying window. | |
target_site_set | Site set in which neighbor sites are extracted. | |
p_ref | Window center. |
Definition at line 249 of file graph_window_piter.hh.
References mln::graph_window_piter< S, W, I >::init_().
const C & mln::internal::site_relative_iterator_base< S, E, C >::center | ( | ) | const [inline, inherited] |
The psite around which this iterator moves.
Definition at line 173 of file site_relative_iterator_base.hh.
References mln::internal::site_relative_iterator_base< S, E, C >::c_.
Referenced by mln::complex_window_bkd_piter< I, G, W >::center_at_(), mln::complex_window_fwd_piter< I, G, W >::center_at_(), mln::complex_neighborhood_bkd_piter< I, G, N >::center_at_(), mln::complex_neighborhood_fwd_piter< I, G, N >::center_at_(), mln::graph_window_if_piter< S, W, I >::compute_p_(), mln::complex_window_bkd_piter< I, G, W >::compute_p_(), mln::complex_window_fwd_piter< I, G, W >::compute_p_(), mln::complex_neighborhood_bkd_piter< I, G, N >::compute_p_(), and mln::complex_neighborhood_fwd_piter< I, G, N >::compute_p_().
void mln::internal::site_relative_iterator_base< S, E, C >::center_at | ( | const P & | c | ) | [inline, inherited] |
Definition at line 142 of file site_relative_iterator_base.hh.
References mln::internal::site_relative_iterator_base< S, E, C >::c_, mln::exact(), and mln::Site_Iterator< E >::invalidate().
Referenced by mln::win::multiple_size_qiter< n, W, F >::init_(), mln::win::multiple_qiter< W, F >::init_(), mln::graph_window_piter< S, W, I >::init_(), mln::graph_window_if_piter< S, W, I >::init_(), mln::dpsites_bkd_piter< V >::init_(), mln::dpsites_fwd_piter< V >::init_(), mln::complex_window_bkd_piter< I, G, W >::init_(), mln::complex_window_fwd_piter< I, G, W >::init_(), mln::complex_neighborhood_bkd_piter< I, G, N >::init_(), and mln::complex_neighborhood_fwd_piter< I, G, N >::init_().
void mln::graph_window_piter< S, W, I >::center_at_ | ( | const p_graph_piter< S2, I2 > & | c | ) | [inline] |
Do some work while setting the reference site.
Definition at line 325 of file graph_window_piter.hh.
References mln::p_graph_piter< S, I >::hook_elt_().
void mln::graph_window_piter< S, W, I >::center_at_ | ( | const Pref & | c | ) | [inline] |
Do some work while setting the reference site.
Definition at line 316 of file graph_window_piter.hh.
void mln::internal::site_relative_iterator_base< S, E, C >::change_target | ( | const S & | s | ) | [inline, inherited] |
Change the site set targeted by this iterator.
Definition at line 208 of file site_relative_iterator_base.hh.
References mln::if_possible::change_target(), mln::Site_Iterator< E >::invalidate(), and mln::internal::site_iterator_base< S, E >::s_.
Referenced by mln::win::multiple_size_qiter< n, W, F >::init_(), mln::graph_window_piter< S, W, I >::init_(), mln::graph_window_if_piter< S, W, I >::init_(), mln::dpsites_bkd_piter< V >::init_(), mln::dpsites_fwd_piter< V >::init_(), mln::complex_window_bkd_piter< I, G, W >::init_(), mln::complex_window_fwd_piter< I, G, W >::init_(), mln::complex_neighborhood_bkd_piter< I, G, N >::init_(), and mln::complex_neighborhood_fwd_piter< I, G, N >::init_().
void mln::graph_window_piter< S, W, I >::change_target_site_set | ( | const S & | s | ) | [inline] |
Change the target site set.
Window elements different from the center come from the target site set.
Definition at line 357 of file graph_window_piter.hh.
Referenced by mln::graph_window_piter< S, W, I >::init_().
W::psite mln::graph_window_piter< S, W, I >::compute_p_ | ( | ) | const [inline] |
Compute the current psite.
Definition at line 333 of file graph_window_piter.hh.
References mln::graph_window_piter< S, W, I >::target_site_set().
void mln::graph_window_piter< S, W, I >::do_next_ | ( | ) | [inline] |
void mln::internal::impl_selector< C, P, E >::do_start_ | ( | ) | [inline, inherited] |
Definition at line 57 of file graph_window_piter.hh.
const graph_window_piter< S, W, I >::graph_element & mln::graph_window_piter< S, W, I >::element | ( | ) | const [inline] |
Return the graph element pointed by this iterator.
Definition at line 341 of file graph_window_piter.hh.
unsigned mln::graph_window_piter< S, W, I >::id | ( | ) | const [inline] |
Return the graph element id.
FIXME: we do not want to have this member since there is an automatic conversion to the graph element. C++ does not seem to use this conversion operator.
Definition at line 349 of file graph_window_piter.hh.
void mln::graph_window_piter< S, W, I >::init_ | ( | const Window< W > & | win, | |
const Site_Set< S > & | target_site_set, | |||
const Pref & | p_ref | |||
) | [inline] |
Definition at line 277 of file graph_window_piter.hh.
References mln::internal::site_relative_iterator_base< S, E, C >::center_at(), mln::internal::site_relative_iterator_base< S, E, C >::change_target(), mln::graph_window_piter< S, W, I >::change_target_site_set(), mln::exact(), and mln::Site_Iterator< E >::is_valid().
void mln::graph_window_piter< S, W, I >::init_ | ( | const Window< W > & | win, | |
const Pref & | p_ref | |||
) | [inline] |
Delayed initialization.
Definition at line 264 of file graph_window_piter.hh.
References mln::internal::site_relative_iterator_base< S, E, C >::center_at(), mln::internal::site_relative_iterator_base< S, E, C >::change_target(), mln::exact(), and mln::Site_Iterator< E >::is_valid().
Referenced by mln::graph_window_piter< S, W, I >::graph_window_piter().
void mln::Site_Iterator< E >::invalidate | ( | ) | [inline, inherited] |
Definition at line 112 of file site_iterator.hh.
References mln::exact(), and mln::Site_Iterator< E >::is_valid().
Referenced by mln::internal::site_relative_iterator_base< S, E, C >::center_at(), mln::internal::site_set_iterator_base< S, E >::change_target(), mln::internal::site_relative_iterator_base< S, E, C >::change_target(), mln::internal::piter_adaptor_< Pi, S, E >::change_target(), mln::p_transformed_piter< Pi, S, F >::change_target(), and mln::morpho::tree::depth1st_piter< T >::start_().
void mln::graph_window_piter< S, W, I >::invalidate_ | ( | ) | [inline] |
bool mln::Site_Iterator< E >::is_valid | ( | ) | const [inline, inherited] |
Definition at line 101 of file site_iterator.hh.
References mln::exact().
Referenced by mln::graph_window_piter< S, W, I >::init_(), mln::graph_window_if_piter< S, W, I >::init_(), mln::complex_window_bkd_piter< I, G, W >::init_(), mln::complex_window_fwd_piter< I, G, W >::init_(), mln::complex_neighborhood_bkd_piter< I, G, N >::init_(), mln::complex_neighborhood_fwd_piter< I, G, N >::init_(), mln::Site_Iterator< E >::invalidate(), mln::Site_Iterator< E >::next(), mln::internal::site_relative_iterator_base< S, E, C >::next_(), mln::p_graph_piter< S, I >::next_(), mln::internal::p_complex_piter_base_< I, S, P, E >::next_(), mln::morpho::tree::depth1st_piter< T >::next_(), mln::internal::p_complex_piter_base_< I, S, P, E >::p_complex_piter_base_(), mln::p_graph_piter< S, I >::p_graph_piter(), mln::internal::site_relative_iterator_base< S, E, C >::start_(), mln::p_graph_piter< S, I >::start_(), mln::internal::p_complex_piter_base_< I, S, P, E >::start_(), mln::internal::site_relative_iterator_base< S, E, C >::update(), mln::p_graph_piter< S, I >::update_(), and mln::internal::p_complex_piter_base_< I, S, P, E >::update_().
bool mln::graph_window_piter< S, W, I >::is_valid_ | ( | ) | const [inline] |
void mln::Site_Iterator< E >::next | ( | ) | [inline, inherited] |
Go to the next element.
Definition at line 92 of file site_iterator.hh.
References mln::exact(), and mln::Site_Iterator< E >::is_valid().
Referenced by mln::morpho::tree::depth1st_piter< T >::start_().
void mln::internal::site_relative_iterator_base< S, E, C >::next_ | ( | ) | [inline, inherited] |
Go to the next point.
Definition at line 163 of file site_relative_iterator_base.hh.
References mln::exact(), and mln::Site_Iterator< E >::is_valid().
const S::psite & mln::internal::site_relative_iterator_base< S, E, C >::p_hook_ | ( | ) | const [inline, inherited] |
const S & mln::internal::site_relative_iterator_base< S, E, C >::site_set | ( | ) | const [inline, inherited] |
Give the site set (neighborhood or window) that this iterator browses.
Definition at line 182 of file site_relative_iterator_base.hh.
References mln::internal::site_iterator_base< S, E >::s_.
Referenced by mln::complex_window_bkd_piter< I, G, W >::compute_p_(), mln::complex_window_fwd_piter< I, G, W >::compute_p_(), mln::complex_neighborhood_bkd_piter< I, G, N >::compute_p_(), and mln::complex_neighborhood_fwd_piter< I, G, N >::compute_p_().
void mln::Site_Iterator< E >::start | ( | ) | [inline, inherited] |
Reimplemented in mln::hexa_fwd_piter_< S >.
Definition at line 123 of file site_iterator.hh.
References mln::exact().
void mln::internal::site_relative_iterator_base< S, E, C >::start_ | ( | ) | [inline, inherited] |
Start an iteration.
Definition at line 153 of file site_relative_iterator_base.hh.
References mln::exact(), and mln::Site_Iterator< E >::is_valid().
const S::psite & mln::internal::site_relative_iterator_base< S, E, C >::subj_ | ( | ) | [inline, inherited] |
This overriding is very useful: it adds a test to prevent getting an invalid iterator when its center has moved.
Some sub-classes provide an update() method for the client to say that she really want to read the iterator just after the center has changed.
Reimplemented from mln::internal::site_iterator_base< S, E >.
Definition at line 191 of file site_relative_iterator_base.hh.
References mln::exact().
const S *& mln::internal::site_iterator_base< S, E >::target_ | ( | ) | [inline, inherited] |
const S & mln::graph_window_piter< S, W, I >::target_site_set | ( | ) | const [inline] |
Return the target site set.
Window elements different from the center come from the target site set.
Definition at line 366 of file graph_window_piter.hh.
Referenced by mln::graph_window_piter< S, W, I >::compute_p_().
const S::site & mln::internal::site_iterator_base< S, E >::to_site | ( | ) | const [inline, inherited] |
Return the site it points to (as a Site_Proxy).
Definition at line 110 of file site_iterator_base.hh.
References mln::exact().
E & mln::internal::site_relative_iterator_base< S, E, C >::update | ( | ) | [inline, inherited] |
Warning: this method is an advanced tool provided for very special occasions; if you are a regular user, you should never use it! Calling this method forces this relative iterator to synchronize with its center when it has just moved and when the relative iterator still makes sense.
Definition at line 221 of file site_relative_iterator_base.hh.
References mln::internal::site_relative_iterator_base< S, E, C >::c_, mln::exact(), mln::Site_Iterator< E >::is_valid(), and mln::internal::site_iterator_base< S, E >::s_.
friend class internal::impl_selector< typename W::center_t, typenameW::psite,graph_window_piter< S, W, I > > [friend] |
Definition at line 213 of file graph_window_piter.hh.
const C* mln::internal::site_relative_iterator_base< S, E, C >::c_ [protected, inherited] |
A pointer to the center psite around which this iterator moves.
Definition at line 108 of file site_relative_iterator_base.hh.
Referenced by mln::internal::site_relative_iterator_base< S, E, C >::center(), mln::internal::site_relative_iterator_base< S, E, C >::center_at(), mln::win::multiple_size_qiter< n, W, F >::compute_p_(), mln::win::multiple_qiter< W, F >::compute_p_(), mln::dpsites_bkd_piter< V >::compute_p_(), mln::dpsites_fwd_piter< V >::compute_p_(), mln::graph_window_if_piter< S, W, I >::do_next_(), mln::graph_window_if_piter< S, W, I >::do_start_(), and mln::internal::site_relative_iterator_base< S, E, C >::update().
I mln::graph_window_piter< S, W, I >::iter_ [private] |
Definition at line 216 of file graph_window_piter.hh.
const S* mln::graph_window_piter< S, W, I >::s_ [private] |
The target.
Reimplemented from mln::internal::site_iterator_base< S, E >.
Definition at line 217 of file graph_window_piter.hh.