12#ifndef __CODAC2_CARTPROD_H__
13#define __CODAC2_CARTPROD_H__
20 IntervalVector cart_prod_dyn(
const Interval& x1,
const Interval& x2);
21 IntervalVector_<2> cart_prod_static(
const Interval& x1,
const Interval& x2);
22 IntervalVector cart_prod_dyn(
const IntervalVector& x1,
const Interval& x2);
25 IntervalVector_<N+1> cart_prod_static(
const IntervalVector_<N>& x1,
const Interval& x2)
27 IntervalVector_<N+1> x;
32 IntervalVector cart_prod_dyn(
const Interval& x1,
const IntervalVector& x2);
35 IntervalVector_<N+1> cart_prod_static(
const Interval& x1,
const IntervalVector_<N>& x2)
37 IntervalVector_<N+1> x;
42 IntervalVector cart_prod_dyn(
const IntervalVector& x1,
const IntervalVector& x2);
45 IntervalVector_<N+M> cart_prod_static(
const IntervalVector_<N>& x1,
const IntervalVector_<M>& x2)
47 IntervalVector_<N+M> x;
52 template<
int N,
typename T1,
typename T2,
typename... Args>
53 IntervalVector_<N> cart_prod(
const T1& x1,
const T2& x2,
const Args&... xi)
55 auto x_ = cart_prod_static(x1, x2);
56 if constexpr(
sizeof...(xi) > 0)
57 return cart_prod<N>(x_, xi...);
62 template<
typename T1,
typename T2,
typename... Args>
63 IntervalVector cart_prod(
const T1& x1,
const T2& x2,
const Args&... xi)
65 IntervalVector x_ = cart_prod_dyn(IntervalVector(x1), IntervalVector(x2));
66 if constexpr(
sizeof...(xi) > 0)
67 return cart_prod(x_, xi...);