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_LOGICAL_AND_NOT_HH
00027 # define MLN_LOGICAL_AND_NOT_HH
00028 
00032 
00033 # include <mln/logical/includes.hh>
00034 # include <mln/fun/vv2v/land_not.hh>
00035 
00036 
00037 namespace mln
00038 {
00039 
00040   namespace logical
00041   {
00042 
00051     template <typename L, typename R>
00052     mln_ch_fun_vv2v(land_not, L, R)
00053     and_not(const Image<L>& lhs, const Image<R>& rhs);
00054 
00055 
00067     template <typename L, typename R>
00068     void and_not_inplace(Image<L>& lhs, const Image<R>& rhs);
00069 
00070 
00071 # ifndef MLN_INCLUDE_ONLY
00072 
00073     template <typename L, typename R>
00074     inline
00075     mln_ch_fun_vv2v(land_not, L, R)
00076     and_not(const Image<L>& lhs, const Image<R>& rhs)
00077     {
00078       trace::entering("logical::and_not");
00079 
00080       internal::tests(lhs, rhs);
00081 
00082       mln_fun_vv2v(land_not, L, R) f;
00083       mln_ch_fun_vv2v(land_not, L, R) output = data::transform(lhs, rhs, f);
00084 
00085       trace::exiting("logical::and_not");
00086       return output;
00087     }
00088 
00089     template <typename L, typename R>
00090     inline
00091     void and_not_inplace(Image<L>& lhs, const Image<R>& rhs)
00092     {
00093       trace::entering("logical::and_not_inplace");
00094 
00095       mlc_converts_to(mln_fun_vv2v_result(land_not, L, R),
00096                       mln_value(L))::check();
00097 
00098       internal::tests(lhs, rhs);
00099 
00100       mln_fun_vv2v(land_not, L, R) f;
00101       data::transform_inplace(lhs, rhs, f);
00102 
00103       trace::exiting("logical::and_not_inplace");
00104     }
00105 
00106 # endif // ! MLN_INCLUDE_ONLY
00107 
00108   } 
00109 
00110 } 
00111 
00112 
00113 #endif // ! MLN_LOGICAL_AND_NOT_HH