mln::win::line< M, i, C > Struct Template Reference
[N-D windows]

Generic line window defined on a given grid in the given dimension. More...

#include <line.hh>

Inheritance diagram for mln::win::line< M, i, C >:

Inheritance graph

List of all members.

Public Types

enum  { dir = i }
 Direction. More...
typedef dpsites_fwd_piter< E > bkd_qiter
 Backward site iterator associated type.
typedef Window< void > category
typedef psite center_t
 Type of the window center.
typedef D dpsite
 DPsite associated type.
typedef E exact_t
typedef dpsites_fwd_piter< E > fwd_qiter
 Forward site iterator associated type.
typedef D::psite psite
 Psite associated type.
typedef fwd_qiter qiter
 Site iterator associated type.
typedef window< D > regular
 Regular window associated type.
typedef D::site site
 Site associated type.

Public Member Functions

unsigned delta () const
 Give the maximum coordinate gap between the window center and a window point.
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 the delta-point dp belongs to the window.
bool is_centered () const
 Test if the window is centered; return true.
bool is_empty () const
 Test if the window is empty (null size; no delta-point).
bool is_neighbable_ () const
 Test if this window can be a neighborhood.
bool is_symmetric () const
 Test if the window is symmetric; return true.
bool is_valid () const
 return true by default.
unsigned length () const
 Give the line length.
 line (unsigned length)
 Constructor.
void print (std::ostream &ostr) const
 Print into ostr the window definition.
void print_ (std::ostream &ostr) const
unsigned size () const
 Give the line size, that is, its length.
const std::vector< D > & std_vector () const
 Give the vector of delta-points.
void sym ()
 Apply a central symmetry to the target window; a no-op here.
const std::vector< D > & vect () const
 Give the vector of delta-points.

Protected Member Functions

void insert (const D &d)

Protected Attributes

unsigned length_
mln::window< D > win_


Detailed Description

template<typename M, unsigned i, typename C>
struct mln::win::line< M, i, C >

Generic line window defined on a given grid in the given dimension.

An line is centered and symmetric; so its length is odd.

M is the given grid on which the line is defined, i is the given dimension of the line end C is the type of the coordinates.

See also:
mln::win::hline2d for an exemple of his use.

Definition at line 73 of file win/line.hh.


Member Typedef Documentation

template<typename D, typename E>
typedef dpsites_fwd_piter<E> mln::internal::classical_window_base< D, E >::bkd_qiter [inherited]

Backward site iterator associated type.

Definition at line 67 of file classical_window_base.hh.

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

Reimplemented from mln::Object< E >.

Definition at line 89 of file concept/window.hh.

template<typename D, typename E>
typedef psite mln::internal::window_base< D, E >::center_t [inherited]

Type of the window center.

Definition at line 62 of file window_base.hh.

template<typename D, typename E>
typedef D mln::internal::window_base< D, E >::dpsite [inherited]

DPsite associated type.

Reimplemented in mln::win::multiple< W, F >, and mln::win::multiple_size< n, W, F >.

Definition at line 53 of file window_base.hh.

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

Definition at line 172 of file object.hh.

template<typename D, typename E>
typedef dpsites_fwd_piter<E> mln::internal::classical_window_base< D, E >::fwd_qiter [inherited]

Forward site iterator associated type.

Definition at line 64 of file classical_window_base.hh.

template<typename D, typename E>
typedef D ::psite mln::internal::window_base< D, E >::psite [inherited]

Psite associated type.

Reimplemented in mln::win::multiple< W, F >, and mln::win::multiple_size< n, W, F >.

Definition at line 56 of file window_base.hh.

template<typename D, typename E>
typedef fwd_qiter mln::internal::classical_window_base< D, E >::qiter [inherited]

Site iterator associated type.

Definition at line 70 of file classical_window_base.hh.

template<typename D, typename E>
typedef window<D> mln::internal::classical_window_base< D, E >::regular [inherited]

Regular window associated type.

Definition at line 60 of file classical_window_base.hh.

template<typename D, typename E>
typedef D ::site mln::internal::window_base< D, E >::site [inherited]

Site associated type.

Reimplemented in mln::win::multiple< W, F >, and mln::win::multiple_size< n, W, F >.

Definition at line 59 of file window_base.hh.


Member Enumeration Documentation

template<typename M, unsigned i, typename C>
anonymous enum

Direction.

Enumerator:
dir 

Definition at line 76 of file win/line.hh.


Constructor & Destructor Documentation

template<typename M, unsigned i, typename C>
mln::win::line< M, i, C >::line ( unsigned  length  )  [inline]

Constructor.

Parameters:
[in] length Length of the line.
Precondition:
length is odd.

Definition at line 106 of file win/line.hh.

References mln::internal::classical_window_base< D, E >::insert(), and mln::dpoint< G, C >::set_all().


Member Function Documentation

template<typename D, typename E>
unsigned mln::internal::classical_window_base< D, E >::delta (  )  const [inline, inherited]

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

Definition at line 177 of file classical_window_base.hh.

References mln::exact().

template<typename M, unsigned i, typename C>
unsigned mln::win::line< M, i, C >::delta_ (  )  const [inline]

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

Reimplemented from mln::internal::classical_window_base< D, E >.

Definition at line 139 of file win/line.hh.

References mln::win::line< M, i, C >::length_.

template<typename D, typename E>
const D & mln::internal::classical_window_base< D, E >::dp ( unsigned  i  )  const [inline, inherited]

template<typename D, typename E>
bool mln::internal::classical_window_base< D, E >::has ( const D &  dp  )  const [inline, inherited]

Test if the delta-point dp belongs to the window.

Definition at line 221 of file classical_window_base.hh.

References mln::internal::classical_window_base< D, E >::win_.

template<typename D, typename E>
void mln::internal::classical_window_base< D, E >::insert ( const D &  d  )  [inline, protected, inherited]

template<typename D, typename E>
bool mln::internal::classical_window_base< D, E >::is_centered (  )  const [inline, inherited]

Test if the window is centered; return true.

Definition at line 150 of file classical_window_base.hh.

References mln::internal::classical_window_base< D, E >::win_.

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

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

Definition at line 142 of file classical_window_base.hh.

References mln::internal::classical_window_base< D, E >::win_.

template<typename D, typename E>
bool mln::internal::window_base< D, E >::is_neighbable_ (  )  const [inline, inherited]

Test if this window can be a neighborhood.

Definition at line 95 of file window_base.hh.

References mln::exact().

Referenced by mln::convert::over_load::from_to_().

template<typename D, typename E>
bool mln::internal::classical_window_base< D, E >::is_symmetric (  )  const [inline, inherited]

Test if the window is symmetric; return true.

Definition at line 159 of file classical_window_base.hh.

References mln::internal::classical_window_base< D, E >::win_.

template<typename D, typename E>
bool mln::internal::window_base< D, E >::is_valid (  )  const [inline, inherited]

template<typename M, unsigned i, typename C>
unsigned mln::win::line< M, i, C >::length (  )  const [inline]

Give the line length.

Definition at line 125 of file win/line.hh.

References mln::win::line< M, i, C >::length_.

Referenced by mln::data::impl::hmedian().

template<typename D, typename E>
void mln::internal::classical_window_base< D, E >::print ( std::ostream &  ostr  )  const [inline, inherited]

Print into ostr the window definition.

Definition at line 237 of file classical_window_base.hh.

References mln::exact().

template<typename M, unsigned i, typename C>
void mln::win::line< M, i, C >::print_ ( std::ostream &  ostr  )  const [inline]

Reimplemented from mln::internal::classical_window_base< D, E >.

Definition at line 147 of file win/line.hh.

References mln::win::line< M, i, C >::length_.

template<typename M, unsigned i, typename C>
unsigned mln::win::line< M, i, C >::size (  )  const [inline]

Give the line size, that is, its length.

Reimplemented from mln::internal::classical_window_base< D, E >.

Definition at line 132 of file win/line.hh.

References mln::win::line< M, i, C >::length_.

template<typename D, typename E>
const std::vector< D > & mln::internal::classical_window_base< D, E >::std_vector (  )  const [inline, inherited]

Give the vector of delta-points.

Reimplemented in mln::win::rectangle2d.

Definition at line 205 of file classical_window_base.hh.

References mln::internal::classical_window_base< D, E >::win_.

Referenced by mln::internal::classical_window_base< D, E >::vect().

template<typename D, typename E>
void mln::internal::classical_window_base< D, E >::sym (  )  [inline, inherited]

Apply a central symmetry to the target window; a no-op here.

Definition at line 168 of file classical_window_base.hh.

References mln::internal::classical_window_base< D, E >::win_.

template<typename D, typename E>
const std::vector< D > & mln::internal::classical_window_base< D, E >::vect (  )  const [inline, inherited]

Give the vector of delta-points.

Definition at line 213 of file classical_window_base.hh.

References mln::internal::classical_window_base< D, E >::std_vector().


Member Data Documentation

template<typename M, unsigned i, typename C>
unsigned mln::win::line< M, i, C >::length_ [protected]

template<typename D, typename E>
mln::window<D> mln::internal::classical_window_base< D, E >::win_ [protected, inherited]


Generated on Sun Apr 25 02:07:54 2010 for Milena (Olena) by  doxygen 1.5.6