• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List

graph_elt_mixed_window.hh

00001 // Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
00002 //
00003 // This file is part of Olena.
00004 //
00005 // Olena is free software: you can redistribute it and/or modify it under
00006 // the terms of the GNU General Public License as published by the Free
00007 // Software Foundation, version 2 of the License.
00008 //
00009 // Olena is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Olena.  If not, see <http://www.gnu.org/licenses/>.
00016 //
00017 // As a special exception, you may use this file as part of a free
00018 // software project without restriction.  Specifically, if other files
00019 // instantiate templates or use macros or inline functions from this
00020 // file, or you compile this file and link it with other files to produce
00021 // an executable, this file does not by itself cause the resulting
00022 // executable to be covered by the GNU General Public License.  This
00023 // exception does not however invalidate any other reasons why the
00024 // executable file might be covered by the GNU General Public License.
00025 
00026 #ifndef MLN_CORE_IMAGE_GRAPH_ELT_MIXED_WINDOW_HH
00027 # define MLN_CORE_IMAGE_GRAPH_ELT_MIXED_WINDOW_HH
00028 
00033 
00034 # include <mln/core/concept/window.hh>
00035 # include <mln/core/internal/neighborhood_base.hh>
00036 # include <mln/core/internal/graph_window_base.hh>
00037 # include <mln/core/image/graph_window_piter.hh>
00038 
00039 
00040 namespace mln
00041 {
00042 
00044   template <typename G, typename S, typename S2> class graph_elt_mixed_window;
00045   template <typename G, typename F> struct p_edges;
00046   template <typename G, typename F> struct p_vertices;
00047   namespace util
00048   {
00049     template <typename G> class edge;
00050     template <typename G> class vertex;
00051   };
00052 
00053 
00054   namespace internal
00055   {
00056 
00057     template <typename G, typename S, typename S2, typename E>
00058     struct neighborhood_impl<graph_elt_mixed_window<G,S,S2>,E>
00059       : public neighborhood_extra_impl<graph_elt_mixed_window<G,S,S2>,E>
00060     {
00061     };
00062 
00063 
00071     //
00072     template <typename G, typename S, typename S2>
00073     struct graph_mixed_window_iter_dispatch;
00074 
00075     template <typename G, typename F, typename F2>
00076     struct graph_mixed_window_iter_dispatch<G, p_vertices<G,F>, p_edges<G,F2> >
00077     {
00078       typedef mln_vertex_nbh_edge_fwd_iter(G) nbh_fwd_iter_;
00079       typedef mln_vertex_nbh_edge_bkd_iter(G) nbh_bkd_iter_;
00080 
00081       typedef p_edges<G,F2> target;
00082     };
00083 
00084 
00085   } // end of namespace mln::internal
00086 
00087 
00088   namespace trait
00089   {
00090 
00091     template <typename G, typename S, typename S2>
00092     struct window_< mln::graph_elt_mixed_window<G,S,S2> >
00093     {
00094       typedef trait::window::size::unknown       size;
00095       typedef trait::window::support::irregular  support;
00096       typedef trait::window::definition::varying definition;
00097     };
00098 
00099   } // end of namespace mln::trait
00100 
00101 
00107   //
00108   template <typename G, typename S, typename S2>
00109   class graph_elt_mixed_window
00110     : public graph_window_base<mln_result(S2::fun_t),
00111                                graph_elt_mixed_window<G,S,S2> >,
00112       public internal::graph_mixed_window_iter_dispatch<G,S,S2>
00113   {
00114     typedef graph_elt_mixed_window<G,S,S2> self_;
00115     typedef internal::graph_mixed_window_iter_dispatch<G,S,S2> super_;
00116 
00117     typedef typename super_::nbh_fwd_iter_ nbh_fwd_iter_;
00118     typedef typename super_::nbh_bkd_iter_ nbh_bkd_iter_;
00119 
00120   public:
00123     typedef typename super_::target target;
00125     typedef mln_psite(target) psite;
00126 
00128     typedef mln_psite(S) center_t;
00129 
00131     typedef mln_graph_element(target) graph_element;
00132 
00135     typedef graph_window_piter<target,self_,nbh_fwd_iter_> fwd_qiter;
00136 
00139     typedef graph_window_piter<target,self_,nbh_bkd_iter_> bkd_qiter;
00140 
00142     typedef fwd_qiter qiter;
00144 
00145   };
00146 
00147 } // end of namespace mln
00148 
00149 
00150 #endif // ! MLN_CORE_IMAGE_GRAPH_ELT_MIXED_WINDOW_HH

Generated on Tue Oct 4 2011 15:23:49 for Milena (Olena) by  doxygen 1.7.1