oln::neighborhood2d Class Reference

Neighborhood 2 dimensions. More...

#include <neighborhood2d.hh>

Inheritance diagram for oln::neighborhood2d:

Inheritance graph
[legend]
Collaboration diagram for oln::neighborhood2d:

Collaboration graph
[legend]
List of all members.

Public Types

typedef abstract::neighborhoodnd<
neighborhood2d
super_type
 Super type.
typedef neighborhood2d self_type
 Self type.
typedef struct_elt_traits<
self_type >::iter_type 
iter_type
 The associate image's type of iterator.
typedef struct_elt_traits<
self_type >::neighb_type 
neighb_type
typedef struct_elt_traits<
self_type >::dpoint_type 
dpoint_type
 The associate image's type of dpoint (move point).

Public Member Functions

neighborhood2dadd (const dpoint_type &dp)
 Add a dpoint (move point) to the neighborhood.
neighborhood2dadd (coord row, coord col)
 Add a point by coordinates to the neighborhood.
 neighborhood2d ()
 Construct a neighborhood of 2 dimensions.
 neighborhood2d (unsigned size)
 Construct a neighborhood of 2 dimensions.
 neighborhood2d (unsigned n, const coord crd[])
 Construct a neighborhood of 2 dimensions.
 neighborhood2d (const io::internal::anything &r)

Static Public Member Functions

static std::string name ()
 Return the name of the type.

Protected Member Functions

coord delta_update_ (const dpoint_type &dp)
 Update delta.

Friends

class abstract::window_base< abstract::neighborhood< neighborhood2d >, neighborhood2d >

Detailed Description

Neighborhood 2 dimensions.

It looks like structuring elements but here, when you add an element, you add its opposite. Points have 2 dimensions.

Definition at line 65 of file neighborhood2d.hh.


Member Typedef Documentation

typedef struct_elt_traits< self_type >::iter_type oln::neighborhood2d::iter_type

The associate image's type of iterator.

Warning:
Prefer the macros oln_iter_type(Iterable) and oln_iter_type_(Iterable) (the same without the 'typename' keyword)

Definition at line 79 of file neighborhood2d.hh.

typedef struct_elt_traits< self_type >::dpoint_type oln::neighborhood2d::dpoint_type

The associate image's type of dpoint (move point).

Warning:
Prefer the macros oln_dpoint_type(Pointable) and oln_dpoint_type_(Pointable) (the same without the 'typename' keyword)

Reimplemented from oln::abstract::neighborhoodnd< Exact >.

Definition at line 88 of file neighborhood2d.hh.


Constructor & Destructor Documentation

oln::neighborhood2d::neighborhood2d ( unsigned  size  )  [inline]

Construct a neighborhood of 2 dimensions.

Definition at line 130 of file neighborhood2d.hh.

00130                                   : super_type(size)
00131     {}

oln::neighborhood2d::neighborhood2d ( unsigned  n,
const coord  crd[] 
) [inline]

Construct a neighborhood of 2 dimensions.

Definition at line 138 of file neighborhood2d.hh.

References add().

00138                                                   : super_type(n)
00139     {
00140       for (unsigned i = 0; i < 2 * n; i += 2)
00141         add(dpoint_type(crd[i], crd[i+1]));
00142     }


Member Function Documentation

neighborhood2d& oln::neighborhood2d::add ( const dpoint_type dp  )  [inline]

Add a dpoint (move point) to the neighborhood.

Add a new member to the neighborhood. This point must be of 2 dimensions.

Definition at line 100 of file neighborhood2d.hh.

References oln::abstract::neighborhoodnd< Exact >::add_().

Referenced by add(), oln::mk_neighb_rectangle(), neighborhood2d(), and oln::io::internal::read().

00101     {
00102       this->exact().add_(dp);
00103       return this->exact().add_(-dp);
00104     }

neighborhood2d& oln::neighborhood2d::add ( coord  row,
coord  col 
) [inline]

Add a point by coordinates to the neighborhood.

Add a new member by its coordinates to the neighborhood. The coordinates have 2 dimensions.

Definition at line 115 of file neighborhood2d.hh.

References add().

00116     {
00117       return this->add(dpoint_type(row, col));
00118     }

coord oln::neighborhood2d::delta_update_ ( const dpoint_type dp  )  [inline, protected]

Update delta.

Definition at line 168 of file neighborhood2d.hh.

References oln::abstract::window_base< Sup, Exact >::delta_.

00169     {
00170       delta_(abs(dp.row()));
00171       delta_(abs(dp.col()));
00172       return delta_;
00173     }


The documentation for this class was generated from the following file:
Generated on Tue Feb 20 20:24:16 2007 for Olena by  doxygen 1.5.1