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
00027 #ifndef MLN_CORE_IMAGE_GRAPH_ELT_MIXED_WINDOW_HH
00028 # define MLN_CORE_IMAGE_GRAPH_ELT_MIXED_WINDOW_HH
00029
00034
00035 # include <mln/core/concept/window.hh>
00036 # include <mln/core/internal/neighborhood_base.hh>
00037 # include <mln/core/internal/graph_window_base.hh>
00038 # include <mln/core/image/graph_window_piter.hh>
00039
00040
00041 namespace mln
00042 {
00043
00045 template <typename G, typename S, typename S2> class graph_elt_mixed_window;
00046 template <typename G, typename F> class p_edges;
00047 template <typename G, typename F> class p_vertices;
00048 namespace util
00049 {
00050 template <typename G> class edge;
00051 template <typename G> class vertex;
00052 };
00053
00054
00055 namespace internal
00056 {
00057
00058 template <typename G, typename S, typename S2, typename E>
00059 struct neighborhood_impl<graph_elt_mixed_window<G,S,S2>,E>
00060 : public neighborhood_extra_impl<graph_elt_mixed_window<G,S,S2>,E>
00061 {
00062 };
00063
00064
00072
00073 template <typename G, typename S, typename S2>
00074 struct graph_mixed_window_iter_dispatch;
00075
00076 template <typename G, typename F, typename F2>
00077 struct graph_mixed_window_iter_dispatch<G, p_vertices<G,F>, p_edges<G,F2> >
00078 {
00079 typedef mln_vertex_nbh_edge_fwd_iter(G) nbh_fwd_iter_;
00080 typedef mln_vertex_nbh_edge_bkd_iter(G) nbh_bkd_iter_;
00081
00082 typedef p_edges<G,F2> target;
00083 };
00084
00085
00086 }
00087
00088
00089 namespace trait
00090 {
00091
00092 template <typename G, typename S, typename S2>
00093 struct window_< mln::graph_elt_mixed_window<G,S,S2> >
00094 {
00095 typedef trait::window::size::unknown size;
00096 typedef trait::window::support::irregular support;
00097 typedef trait::window::definition::varying definition;
00098 };
00099
00100 }
00101
00102
00108
00109 template <typename G, typename S, typename S2>
00110 class graph_elt_mixed_window
00111 : public graph_window_base<mln_result(S2::fun_t),
00112 graph_elt_mixed_window<G,S,S2> >,
00113 public internal::graph_mixed_window_iter_dispatch<G,S,S2>
00114 {
00115 typedef graph_elt_mixed_window<G,S,S2> self_;
00116 typedef internal::graph_mixed_window_iter_dispatch<G,S,S2> super_;
00117
00118 typedef typename super_::nbh_fwd_iter_ nbh_fwd_iter_;
00119 typedef typename super_::nbh_bkd_iter_ nbh_bkd_iter_;
00120
00121 public:
00124 typedef typename super_::target target;
00126 typedef mln_psite(target) psite;
00127
00129 typedef mln_psite(S) center_t;
00130
00132 typedef mln_graph_element(target) graph_element;
00133
00136 typedef graph_window_piter<target,self_,nbh_fwd_iter_> fwd_qiter;
00137
00140 typedef graph_window_piter<target,self_,nbh_bkd_iter_> bkd_qiter;
00141
00143 typedef fwd_qiter qiter;
00145
00146 };
00147
00148 }
00149
00150
00151 #endif // ! MLN_CORE_IMAGE_GRAPH_ELT_MIXED_WINDOW_HH