22 using Type =
typename ExprType<TU>::Type;
24 static typename Type::Domain fwd(
const TU& x1,
const Interval& x2)
29 static Type fwd(
const TU& x1,
const ScalarType& x2)
37 x2.def_domain && x1.tdomain()->t0_tf().is_superset(x2.m)
42 [[maybe_unused]]
const TU& x1,
43 [[maybe_unused]]
const typename Type::Domain& y,
44 [[maybe_unused]] Interval& x2)
51 template<
typename TU,
typename T,
typename S>
52 class AnalyticOperationExpr<TubeOp<TU>,T,S>
57 AnalyticOperationExpr(
const TU& x1,
const ScalarExpr& x2)
58 :
OperationExprBase<AnalyticExpr<ScalarType>>(x2), _x1(std::make_shared<const TU>(x1))
61 std::shared_ptr<ExprBase>
copy()
const
63 return std::make_shared<AnalyticOperationExpr<TubeOp<TU>,T,ScalarType>>(*this);
66 void replace_arg(
const ExprID& old_arg_id,
const std::shared_ptr<ExprBase>& new_expr)
71 const T& fwd_eval(ValuesMap& v, Index total_input_size,
bool natural_eval)
const
73 return AnalyticExpr<T>::init_value(
74 v, TubeOp<TU>::fwd(*_x1, std::get<0>(this->
_x)->fwd_eval(v, total_input_size, natural_eval)));
77 void bwd_eval(ValuesMap& v)
const
79 TubeOp<TU>::bwd(*_x1, AnalyticExpr<T>::value(v).a, std::get<0>(this->
_x)->value(v).a);
80 std::get<0>(this->
_x)->bwd_eval(v);
83 std::pair<Index,Index> output_shape()
const {
87 virtual bool belongs_to_args_list(
const FunctionArgsList& args)
const
89 return std::get<0>(this->
_x)->belongs_to_args_list(args);
92 std::string str(
bool in_parentheses =
false)
const
95 return in_parentheses ?
"(" + s +
")" : s;
98 virtual bool is_str_leaf()
const
105 const std::shared_ptr<const TU> _x1;
virtual std::shared_ptr< ExprBase > copy() const =0
Creates a copy of the current expression.
A base class for expressions representing operations with multiple operands.
Definition codac2_ExprBase.h:178
OperationExprBase(std::shared_ptr< X >... x)
Definition codac2_ExprBase.h:190
std::tuple< std::shared_ptr< X >... > _x
Definition codac2_ExprBase.h:292
Definition codac2_OctaSym.h:21
Eigen::Matrix< Interval,-1,-1 > IntervalMatrix
Alias for a dynamic-size matrix of intervals.
Definition codac2_IntervalMatrix.h:25