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

mln::win::ball< G, C > Struct Template Reference
[N-D windows]

Generic ball window defined on a given grid. More...

#include <ball.hh>

Inheritance diagram for mln::win::ball< G, C >:
Inheritance graph

List of all members.

Public Types

typedef dpsites_fwd_piter
< ball< G, C > > 
bkd_qiter
 Backward site iterator associated type.
typedef Window< void > category
typedef psite center_t
 Type of the window center.
typedef dpoint< G, C > dpsite
 DPsite associated type.
typedef ball< G, C > exact_t
typedef dpsites_fwd_piter
< ball< G, C > > 
fwd_qiter
 Forward site iterator associated type.
typedef dpoint< G, C >::psite psite
 Psite associated type.
typedef fwd_qiter qiter
 Site iterator associated type.
typedef window< dpoint< G, C > > regular
 Regular window associated type.
typedef dpoint< G, C >::site site
 Site associated type.

Public Member Functions

 ball (unsigned diameter)
 Constructor.
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.
unsigned diameter () const
 Give the ball diameter.
const dpoint< G, C > & dp (unsigned i) const
 Give the i-th delta-point.
bool has (const dpoint< G, C > &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.
void print (std::ostream &ostr) const
 Print into ostr the window definition.
void print_ (std::ostream &ostr) const
unsigned size () const
 Give the number of delta-points.
const std::vector< dpoint< G,
C > > & 
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< dpoint< G,
C > > & 
vect () const
 Give the vector of delta-points.

Protected Member Functions

void insert (const dpoint< G, C > &d)

Protected Attributes

unsigned diameter_
mln::window< dpoint< G, C > > win_

Detailed Description

template<typename G, typename C>
struct mln::win::ball< G, C >

Generic ball window defined on a given grid.

A ball is centered and symmetric; so its diameter is odd.

G is the given grid on which the ball is defined and C is the type of coordinates.

Definition at line 71 of file ball.hh.


Member Typedef Documentation

typedef dpsites_fwd_piter<ball< G, C > > mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::bkd_qiter [inherited]

Backward site iterator associated type.

Definition at line 67 of file classical_window_base.hh.

typedef Window<void> mln::Window< ball< G, C > >::category [inherited]

Reimplemented from mln::Object< ball< G, C > >.

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

typedef psite mln::internal::window_base< dpoint< G, C > , ball< G, C > >::center_t [inherited]

Type of the window center.

Definition at line 62 of file window_base.hh.

typedef dpoint< G, C > mln::internal::window_base< dpoint< G, C > , ball< G, C > >::dpsite [inherited]

DPsite associated type.

Definition at line 53 of file window_base.hh.

typedef ball< G, C > mln::Object< ball< G, C > >::exact_t [inherited]

Definition at line 173 of file object.hh.

typedef dpsites_fwd_piter<ball< G, C > > mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::fwd_qiter [inherited]

Forward site iterator associated type.

Definition at line 64 of file classical_window_base.hh.

typedef dpoint< G, C > ::psite mln::internal::window_base< dpoint< G, C > , ball< G, C > >::psite [inherited]

Psite associated type.

Definition at line 56 of file window_base.hh.

typedef fwd_qiter mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::qiter [inherited]

Site iterator associated type.

Definition at line 70 of file classical_window_base.hh.

typedef window<dpoint< G, C > > mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::regular [inherited]

Regular window associated type.

Definition at line 60 of file classical_window_base.hh.

typedef dpoint< G, C > ::site mln::internal::window_base< dpoint< G, C > , ball< G, C > >::site [inherited]

Site associated type.

Definition at line 59 of file window_base.hh.


Constructor & Destructor Documentation

template<typename G , typename C >
mln::win::ball< G, C >::ball ( unsigned  diameter  )  [inline]

Constructor.

Parameters:
[in] diameter Diameter of the ball.
Precondition:
diameter is odd.

Definition at line 99 of file ball.hh.

References mln::all_to(), mln::internal::classical_window_base< dpoint< G, C >, ball< G, C > >::insert(), and mln::literal::origin.


Member Function Documentation

unsigned mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::delta (  )  const [inherited]

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

template<typename G , typename C >
unsigned mln::win::ball< G, C >::delta_ (  )  const [inline]

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

Reimplemented from mln::internal::classical_window_base< dpoint< G, C >, ball< G, C > >.

Definition at line 129 of file ball.hh.

References mln::win::ball< G, C >::diameter_.

template<typename G , typename C >
unsigned mln::win::ball< G, C >::diameter (  )  const [inline]
const dpoint< G, C > & mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::dp ( unsigned  i  )  const [inherited]

Give the i-th delta-point.

bool mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::has ( const dpoint< G, C > &  dp  )  const [inherited]

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

void mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::insert ( const dpoint< G, C > &  d  )  [protected, inherited]
bool mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::is_centered (  )  const [inherited]

Test if the window is centered; return true.

bool mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::is_empty (  )  const [inherited]

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

bool mln::internal::window_base< dpoint< G, C > , ball< G, C > >::is_neighbable_ (  )  const [inherited]

Test if this window can be a neighborhood.

bool mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::is_symmetric (  )  const [inherited]

Test if the window is symmetric; return true.

bool mln::internal::window_base< dpoint< G, C > , ball< G, C > >::is_valid (  )  const [inherited]

return true by default.

void mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::print ( std::ostream &  ostr  )  const [inherited]

Print into ostr the window definition.

template<typename G , typename C >
void mln::win::ball< G, C >::print_ ( std::ostream &  ostr  )  const [inline]
unsigned mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::size (  )  const [inherited]

Give the number of delta-points.

const std::vector<dpoint< G, C > >& mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::std_vector (  )  const [inherited]

Give the vector of delta-points.

void mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::sym (  )  [inherited]

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

const std::vector<dpoint< G, C > >& mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::vect (  )  const [inherited]

Give the vector of delta-points.


Member Data Documentation

template<typename G , typename C >
unsigned mln::win::ball< G, C >::diameter_ [protected]
mln::window<dpoint< G, C > > mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::win_ [protected, inherited]

Definition at line 118 of file classical_window_base.hh.