mln::window< D > Class Template Reference

Generic window class. More...

#include <window.hh>

Inherits window_base< D, window< D > >.

List of all members.

Public Types

typedef dpsites_bkd_piter
< window< D > > 
bkd_qiter
 Site_Iterator type to browse the points of a basic window w.r.t. the reverse ordering of delta-points.
typedef dpsites_fwd_piter
< window< D > > 
fwd_qiter
 Site_Iterator type to browse the points of a basic window w.r.t. the ordering of delta-points.
typedef fwd_qiter qiter
 Site_Iterator type to browse the points of a basic window whatever the ordering of delta-points.
typedef window< D > regular
 Regular window associated type.

Public Member Functions

void clear ()
 Clear the window.
unsigned delta () const
 Give the maximum coordinate gap between the window center and a window point.
const D & dp (unsigned i) const
 Give the i-th delta-point.
bool has (const D &dp) const
 Test if dp is in this window definition.
template<typename W >
window< D > & insert (const Window< W > &win)
 Insert another window win.
window< D > & insert (const D &dp)
 Insert a delta-point dp.
bool is_centered () const
 Test if the window is centered.
bool is_empty () const
 Test if the window is empty (null size; no delta-point).
bool is_symmetric () const
void print (std::ostream &ostr) const
 Print the window definition into ostr.
unsigned size () const
 Give the window size, i.e., the number of delta-sites.
const std::vector< D > & std_vector () const
 Give the std vector of delta-points.
void sym ()
 Apply a central symmetry to the target window.
 window ()
 Constructor without argument.
window< D > & insert (const typename D::coord &dind)

Related Functions

(Note that these are not member functions.)

template<typename D >
bool operator== (const window< D > &lhs, const window< D > &rhs)
 Equality comparison between windows lhs and rhs.


Detailed Description

template<typename D>
class mln::window< D >

Generic window class.

This type of window is just like a set of delta-points. The parameter is D, type of delta-point.


Member Typedef Documentation

template<typename D>
typedef dpsites_bkd_piter< window<D> > mln::window< D >::bkd_qiter

Site_Iterator type to browse the points of a basic window w.r.t. the reverse ordering of delta-points.

template<typename D>
typedef dpsites_fwd_piter< window<D> > mln::window< D >::fwd_qiter

Site_Iterator type to browse the points of a basic window w.r.t. the ordering of delta-points.

template<typename D>
typedef fwd_qiter mln::window< D >::qiter

Site_Iterator type to browse the points of a basic window whatever the ordering of delta-points.

template<typename D>
typedef window<D> mln::window< D >::regular

Regular window associated type.


Constructor & Destructor Documentation

template<typename D >
mln::window< D >::window (  )  [inline]

Constructor without argument.

The constructed window is empty.


Member Function Documentation

template<typename D >
void mln::window< D >::clear (  )  [inline]

Clear the window.

template<typename D >
unsigned mln::window< D >::delta (  )  const [inline]

Give the maximum coordinate gap between the window center and a window point.

References mln::window< D >::dp(), and mln::window< D >::size().

template<typename D >
const D & mln::window< D >::dp ( unsigned  i  )  const [inline]

Give the i-th delta-point.

References mln::window< D >::size().

Referenced by mln::window< D >::delta(), and mln::window< D >::insert().

template<typename D >
bool mln::window< D >::has ( const D &  dp  )  const [inline]

Test if dp is in this window definition.

template<typename D >
window< D > & mln::window< D >::insert ( const typename D::coord &  dind  )  [inline]

Insertion of a delta-point with different numbers of arguments (coordinates) w.r.t. the dimension.

References mln::window< D >::dp(), and mln::window< D >::insert().

template<typename D >
template<typename W >
window< D > & mln::window< D >::insert ( const Window< W > &  win  )  [inline]

Insert another window win.

template<typename D >
window< D > & mln::window< D >::insert ( const D &  dp  )  [inline]

template<typename D >
bool mln::window< D >::is_centered (  )  const [inline]

Test if the window is centered.

Returns:
True if the delta-point 0 belongs to the window.

References mln::literal::zero.

template<typename D >
bool mln::window< D >::is_empty (  )  const [inline]

Test if the window is empty (null size; no delta-point).

template<typename D >
bool mln::window< D >::is_symmetric (  )  const [inline]

Test if the window is symmetric.

Returns:
True if for every dp of this window, -dp is also in this window.

References mln::window< D >::sym().

template<typename D >
void mln::window< D >::print ( std::ostream &  ostr  )  const [inline]

Print the window definition into ostr.

template<typename D >
unsigned mln::window< D >::size (  )  const [inline]

template<typename D >
const std::vector< D > & mln::window< D >::std_vector (  )  const [inline]

Give the std vector of delta-points.

template<typename D >
void mln::window< D >::sym (  )  [inline]

Apply a central symmetry to the target window.

References mln::window< D >::insert(), and mln::window< D >::size().

Referenced by mln::window< D >::is_symmetric().


Friends And Related Function Documentation

template<typename D >
bool operator== ( const window< D > &  lhs,
const window< D > &  rhs 
) [related]

Equality comparison between windows lhs and rhs.


Generated on Tue Jul 14 16:32:39 2009 for Milena (Olena) by  doxygen 1.5.9