27 #ifndef MLN_FUN_X2X_COMPOSED_HH
28 # define MLN_FUN_X2X_COMPOSED_HH
34 # include <mln/core/concept/function.hh>
35 # include <mln/fun/internal/x2x_linear_impl.hh>
36 # include <mln/algebra/vec.hh>
37 # include <mln/metal/is.hh>
38 # include <mln/metal/bexpr.hh>
39 # include <mln/algebra/h_mat.hh>
52 template <
typename T2,
typename T1>
57 template <
typename T2,
typename T1,
typename E,
bool is_bij>
65 template <
typename T2,
typename T1,
typename E>
82 using super_::operator();
85 const T2& second()
const;
87 const T1& first()
const;
90 void set_second(
const T2& f);
92 void set_first(
const T1& g);
109 template <
typename T2,
typename T1,
typename E>
127 using super_::operator();
130 void set_second(
const T2& f);
132 void set_first(
const T1& g);
135 const T2& second()
const;
137 const T1& first()
const;
149 template <
typename T2,
typename T1>
151 :
public internal::helper_composed_< T2, T1, composed<T2,T1>,
152 (mlc_is(T2, Function_v2v<T2>)::value &&
153 mlc_is(T1, Function_v2v<T1>)::value) >,
154 private metal::and_< metal::bool_<(T2::dim == T1::dim)>,
155 metal::is<mln_argument(T2), mln_result(T1)>
180 template <
typename T2,
typename T1>
181 fun::x2x::composed<T2,T1>
compose(T2 f, T1 g);
183 # ifndef MLN_INCLUDE_ONLY
196 template <
typename T2,
typename T1,
typename E>
202 template <
typename T2,
typename T1,
typename E>
208 this->m_ = f_.mat() * g_.mat();
211 template <
typename T2,
typename T1,
typename E>
216 return compose(g_.inv(), f_.inv());
219 template <
typename T2,
typename T1,
typename E>
225 this->m_ = this->f_.mat() * this->g_.mat();
228 template <
typename T2,
typename T1,
typename E>
234 this->m_ = this->f_.mat() * this->g_.mat();
237 template <
typename T2,
typename T1,
typename E>
245 template <
typename T2,
typename T1,
typename E>
254 template <
typename T2,
typename T1,
typename E>
260 template <
typename T2,
typename T1,
typename E>
266 this->m_ = f_.mat() * g_.mat();
269 template <
typename T2,
typename T1,
typename E>
275 this->m_ = this->f_.mat() * this->g_.mat();
278 template <
typename T2,
typename T1,
typename E>
284 this->m_ = this->f_.mat() * this->g_.mat();
287 template <
typename T2,
typename T1,
typename E>
295 template <
typename T2,
typename T1,
typename E>
310 template <
typename T2,
typename T1>
312 fun::x2x::composed<T2,T1>
compose(T2 f, T1 g)
314 mln_trace(
"fun::x2x::compose");
315 fun::x2x::composed<T2,T1> comp(f, g);
319 # endif // ! MLN_INCLUDE_ONLY
324 #endif // ! MLN_FUN_X2X_COMPOSED_HH