26 #ifndef MLN_FUN_V2W_W2V_NORM_HH
27 # define MLN_FUN_V2W_W2V_NORM_HH
35 # include <mln/core/concept/function.hh>
36 # include <mln/trait/value_.hh>
38 # include <mln/norm/all.hh>
55 template <
typename V,
typename R>
59 R operator()(
const V& v)
const;
60 V f_1(
const V& v,
const R& r)
const;
68 template <
typename V,
typename R>
72 R operator()(
const V& v)
const;
73 V f_1(
const V& v,
const R& r)
const;
81 template <
typename V,
typename R>
85 R operator()(
const V& v)
const;
86 V f_1(
const V& v,
const R& r)
const;
90 # ifndef MLN_INCLUDE_ONLY
92 template <
typename V,
typename R>
100 template <
typename V,
typename R>
103 l1_norm<V, R>::f_1(
const V& v,
const R& r)
const
108 template <
typename V,
typename R>
111 l2_norm<V, R>::operator()(
const V& v)
const
113 return mln::norm::l2 (v);
116 template <
typename V,
typename R>
119 l2_norm<V, R>::f_1(
const V& v,
const R& r)
const
121 return v / mln::norm::l2 (v) * r;
124 template <
typename V,
typename R>
127 linfty_norm<V, R>::operator()(
const V& v)
const
132 template <
typename V,
typename R>
135 linfty_norm<V, R>::f_1(
const V& v,
const R& r)
const
140 # endif // ! MLN_INCLUDE_ONLY
149 #endif // ! MLN_FUN_V2W_W2V_NORM_HH