20 static Interval fwd(
const Interval& x1,
const Interval& x2);
21 static ScalarType fwd_natural(
const ScalarType& x1,
const ScalarType& x2);
22 static ScalarType fwd_centered(
const ScalarType& x1,
const ScalarType& x2);
23 static void bwd(
const Interval& y, Interval& x1, Interval& x2);
30 min(
const ScalarExpr& x1,
const ScalarExpr& x2)
32 return { std::make_shared<AnalyticOperationExpr<MinOp,ScalarType,ScalarType,ScalarType>>(x1,x2) };
42 inline ScalarType MinOp::fwd_natural(
const ScalarType& x1,
const ScalarType& x2)
46 x1.def_domain && x2.def_domain
50 inline ScalarType MinOp::fwd_centered(
const ScalarType& x1,
const ScalarType& x2)
52 if(centered_form_not_available_for_args(x1,x2))
53 return fwd_natural(x1,x2);
55 assert(x1.da.rows() == 1);
56 assert(x1.da.rows() == x2.da.rows() && x1.da.cols() == x2.da.cols());
58 IntervalMatrix d(1,x1.da.cols());
59 for(Index i = 0 ; i < d.size() ; i++)
60 d(0,i) =
chi(x1.a-x2.a, x1.da(0,i), x2.da(0,i));
66 x1.def_domain && x2.def_domain
80 MaxOp::bwd(-y,mx1,mx2);
82 if(mx1.is_empty() || mx2.is_empty())
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:62
Interval chi(const Interval &x, const Interval &y, const Interval &z)
Return if , if , else.
Definition codac2_Interval_operations_impl.h:299
Interval min(const Interval &x, const Interval &y)
Returns .
Definition codac2_Interval_operations_impl.h:269