Generic w_window class. More...
#include <w_window.hh>
Public Types | |
typedef with_w_ < dpsites_bkd_piter< w_window < D, W > >, W > | bkd_qiter |
Site_Iterator type to browse (backward) the points of a generic w_window. | |
typedef Weighted_Window< void > | category |
typedef D | dpsite |
Dpsite associated type. | |
typedef w_window< D, W > | exact_t |
typedef with_w_ < dpsites_fwd_piter< w_window < D, W > >, W > | fwd_qiter |
Site_Iterator type to browse (forward) the points of a generic w_window. | |
typedef mln::window< D >::psite | psite |
Psite associated type. | |
typedef mln::window< D >::site | site |
Site associated type. | |
typedef W | weight |
Weight associated type. | |
typedef mln::window< D > | window |
Window associated type. | |
Public Member Functions | |
void | clear () |
Clear this window. | |
unsigned | delta () const |
Give the maximum coordinate gap; final method. | |
const mln::window< D >::dpsite & | dp (unsigned i) const |
Give the i-th delta-point; final method. | |
bool | has (const typename mln::window< D >::dpsite &dp) const |
Test if the dp delta-point is in this window; final method. | |
w_window< D, W > & | insert (const W &w, const D &d) |
Insert a couple of weight w and delta-point d . | |
bool | is_centered () const |
Test if the weighted window is centered; final method. | |
bool | is_empty () const |
Test if the weighted window is empty; final method. | |
bool | is_symmetric () const |
Test if the window is symmetric. | |
bool | is_valid () const |
return true by default. | |
unsigned | size () const |
Give the window size; final method. | |
const std::vector< D > & | std_vector () const |
Give access to the vector of delta-points. | |
void | sym () |
Apply a central symmetry to the window. | |
W | w (unsigned i) const |
Give the i-th weight. | |
w_window () | |
Constructor without argument. | |
const std::vector< W > & | weights () const |
Give access to the vector of weights. | |
const mln::window< D > & | win () const |
Give the corresponding window. | |
Protected Attributes | |
std::vector< W > | wei_ |
mln::window< D > | win_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename D , typename W > | |
std::ostream & | operator<< (std::ostream &ostr, const w_window< D, W > &w_win) |
Print a weighted window w_win into an output stream ostr . | |
template<typename D , typename Wl , typename Wr > | |
bool | operator== (const w_window< D, Wl > &lhs, const w_window< D, Wr > &rhs) |
Equality test between two weighted windows lhs and rhs . |
Generic w_window class.
This type of w_window is just like a set of delta-points. The parameter D
is the type of delta-points; the parameter W
is the type of weights.
typedef with_w_< dpsites_bkd_piter< w_window<D, W> >, W > mln::w_window< D, W >::bkd_qiter |
Site_Iterator type to browse (backward) the points of a generic w_window.
typedef Weighted_Window<void> mln::Weighted_Window< w_window< D, W > >::category [inherited] |
Reimplemented from mln::Object< w_window< D, W > >.
typedef D mln::w_window< D, W >::dpsite |
Dpsite associated type.
Reimplemented from mln::internal::weighted_window_base< mln::window< D >, w_window< D, W > >.
typedef w_window< D, W > mln::Object< w_window< D, W > >::exact_t [inherited] |
typedef with_w_< dpsites_fwd_piter< w_window<D, W> >, W > mln::w_window< D, W >::fwd_qiter |
Site_Iterator type to browse (forward) the points of a generic w_window.
typedef mln::window< D > ::psite mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::psite [inherited] |
Psite associated type.
typedef mln::window< D > ::site mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::site [inherited] |
Site associated type.
typedef W mln::w_window< D, W >::weight |
Weight associated type.
typedef mln::window< D > mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::window [inherited] |
Window associated type.
mln::w_window< D, W >::w_window | ( | ) | [inline] |
Constructor without argument.
void mln::w_window< D, W >::clear | ( | ) | [inline] |
Clear this window.
References mln::w_window< D, W >::wei_, and mln::w_window< D, W >::win_.
Referenced by mln::convert::over_load::from_to_().
unsigned mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::delta | ( | ) | const [inherited] |
Give the maximum coordinate gap; final method.
This method is valid iff the support is regular and the definition is not varying.
const mln::window< D > ::dpsite& mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::dp | ( | unsigned | i | ) | const [inherited] |
Give the i-th
delta-point; final method.
This method is valid iff the support is regular and the definition is unique.
Referenced by mln::convert::over_load::from_to_(), and mln::w_window< D, W >::sym().
bool mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::has | ( | const typename mln::window< D > ::dpsite & | dp | ) | const [inherited] |
Test if the dp
delta-point is in this window; final method.
This method is valid iff the support is regular and the definition is unique.
w_window< D, W > & mln::w_window< D, W >::insert | ( | const W & | w, | |
const D & | d | |||
) | [inline] |
Insert a couple of weight w
and delta-point d
.
References mln::w_window< D, W >::wei_, and mln::w_window< D, W >::win_.
Referenced by mln::convert::over_load::from_to_(), mln::w_window< D, W >::sym(), mln::make::w_window(), mln::make::w_window1d(), mln::make::w_window3d(), and mln::make::w_window_directional().
bool mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::is_centered | ( | ) | const [inherited] |
Test if the weighted window is centered; final method.
This method is valid iff the support is regular and the definition is not varying.
bool mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::is_empty | ( | ) | const [inherited] |
Test if the weighted window is empty; final method.
bool mln::w_window< D, W >::is_symmetric | ( | ) | const [inline] |
Test if the window is symmetric.
References mln::w_window< D, W >::sym(), and mln::w_window< D, W >::win_.
bool mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::is_valid | ( | ) | const [inherited] |
return true by default.
Referenced by mln::convert::over_load::from_to_().
unsigned mln::internal::weighted_window_base< mln::window< D > , w_window< D, W > >::size | ( | ) | const [inherited] |
Give the window size; final method.
This method is valid iff the underlying window has a fixed size.
Referenced by mln::convert::over_load::from_to_(), mln::operator==(), and mln::w_window< D, W >::sym().
const std::vector< D > & mln::w_window< D, W >::std_vector | ( | ) | const [inline] |
Give access to the vector of delta-points.
References mln::w_window< D, W >::win_.
void mln::w_window< D, W >::sym | ( | ) | [inline] |
Apply a central symmetry to the window.
References mln::internal::weighted_window_base< mln::window< D >, w_window< D, W > >::dp(), mln::w_window< D, W >::insert(), and mln::internal::weighted_window_base< mln::window< D >, w_window< D, W > >::size().
Referenced by mln::w_window< D, W >::is_symmetric().
W mln::w_window< D, W >::w | ( | unsigned | i | ) | const [inline] |
Give the i-th
weight.
References mln::w_window< D, W >::wei_, and mln::w_window< D, W >::win_.
Referenced by mln::convert::over_load::from_to_().
const std::vector< W > & mln::w_window< D, W >::weights | ( | ) | const [inline] |
Give access to the vector of weights.
References mln::w_window< D, W >::wei_.
Referenced by mln::operator==().
const mln::window< D > & mln::w_window< D, W >::win | ( | ) | const [inline] |
Give the corresponding window.
References mln::w_window< D, W >::win_.
Referenced by mln::operator==().
std::ostream & operator<< | ( | std::ostream & | ostr, | |
const w_window< D, W > & | w_win | |||
) | [related] |
Print a weighted window w_win
into an output stream ostr
.
bool operator== | ( | const w_window< D, Wl > & | lhs, | |
const w_window< D, Wr > & | rhs | |||
) | [related] |
Equality test between two weighted windows lhs
and rhs
.
std::vector<W> mln::w_window< D, W >::wei_ [protected] |
mln::window<D> mln::w_window< D, W >::win_ [protected] |