00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef MLN_CORE_CONCEPT_WEIGHTED_WINDOW_HH
00027 # define MLN_CORE_CONCEPT_WEIGHTED_WINDOW_HH
00028
00034
00035 # include <mln/core/concept/object.hh>
00036 # include <mln/core/concept/iterator.hh>
00037 # include <mln/trait/windows.hh>
00038
00039
00040
00041 # define mln_is_simple_weighted_window(W) \
00042 mln_is_simple_window(typename W::window)
00043
00044
00045
00046 namespace mln
00047 {
00048
00049
00050 template <typename E> struct Weighted_Window;
00051
00052
00053
00054 template <>
00055 struct Weighted_Window<void>
00056 {
00057 typedef Object<void> super;
00058 };
00059
00060
00067 template <typename E>
00068 struct Weighted_Window : public Object<E>
00069 {
00070 typedef Weighted_Window<void> category;
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 protected:
00086 Weighted_Window();
00087 };
00088
00089
00094 template <typename W>
00095 W operator-(const Weighted_Window<W>& rhs);
00096
00097
00098
00099 # ifndef MLN_INCLUDE_ONLY
00100
00101 template <typename E>
00102 inline
00103 Weighted_Window<E>::Weighted_Window()
00104 {
00105 typedef mln_site(E) site;
00106 typedef mln_psite(E) psite;
00107 typedef mln_dpsite(E) dpsite;
00108
00109 typedef mln_weight(E) weight;
00110 typedef mln_window(E) window;
00111
00112 typedef mln_fwd_qiter(E) fwd_qiter;
00113 typedef mln_bkd_qiter(E) bkd_qiter;
00114
00115 void (E::*m1)() = & E::sym;
00116 m1 = 0;
00117
00118 const window& (E::*m2)() const = & E::win;
00119 m2 = 0;
00120 }
00121
00122 # endif // ! MLN_INCLUDE_ONLY
00123
00124 }
00125
00126
00127 #endif // ! MLN_CORE_CONCEPT_WEIGHTED_WINDOW_HH