14 template<
typename Derived>
21 template<
typename CstDerived,
typename... Derived>
25 aff.
linear(), std::make_index_sequence<
sizeof...(Derived)>{}));
31 template<
typename MultDerived,
typename CstDerived,
typename... Derived>
35 m, aff.
linear(), std::make_index_sequence<
sizeof...(Derived)>{}));
39 template<
typename Derived,
typename CstDerived>
41 const Eigen::MatrixBase<CstDerived> & cst)
42 {
return {cst, lin}; }
45 template<
typename Derived,
typename CstDerived>
48 {
return {cst, lin}; }
51 template<
typename LhsDerived,
typename RhsDerived>
55 {
return {lhs, rhs}; }
58 template<
typename RhsDerived,
typename CstDerived,
typename... LhsDerived>
62 {
return {lhs.
constant(), std::tuple_cat(lhs.
linear(), std::forward_as_tuple(rhs))}; }
65 template<
typename LhsDerived,
typename CstDerived,
typename... RhsDerived>
69 {
return {rhs.
constant(), std::tuple_cat(std::forward_as_tuple(lhs), rhs.
linear())}; }
72 template<
typename RhsDerived,
typename CstDerived,
typename... LhsDerived>
78 template<
typename LhsDerived,
typename CstDerived,
typename... RhsDerived>
84 template<
typename LCstDerived,
typename RCstDerived,
typename... LhsDerived,
typename... RhsDerived>
86 AffineExpr<tvm::utils::internal::AddConstantsRetType<LCstDerived, RCstDerived>, LhsDerived..., RhsDerived...>
92 template<
typename MultType,
typename Derived>
100 template<
typename Derived,
102 typename tvm::internal::
103 enable_for_templated_t<SubType, Eigen::MatrixBase, tvm::utils::LinearExpr, tvm::utils::AffineExpr> = 0>
105 {
return lin + -rhs; }
108 template<
typename CstDerived,
111 typename tvm::internal::
112 enable_for_templated_t<SubType, Eigen::MatrixBase, tvm::utils::LinearExpr, tvm::utils::AffineExpr> = 0>
114 {
return aff + -rhs; }
119 template<
typename Derived>
121 {
return {matrix, v}; }
142 template<
typename AddType,
143 typename tvm::internal::
144 enable_for_templated_t<AddType, Eigen::MatrixBase, tvm::utils::LinearExpr, tvm::utils::AffineExpr> = 0>
149 template<
typename AddType,
150 typename tvm::internal::
151 enable_for_templated_t<AddType, Eigen::MatrixBase, tvm::utils::LinearExpr, tvm::utils::AffineExpr> = 0>
163 template<
typename SubType,
164 typename tvm::internal::
165 enable_for_templated_t<SubType, Eigen::MatrixBase, tvm::utils::LinearExpr, tvm::utils::AffineExpr> = 0>
170 template<
typename SubType,
171 typename tvm::internal::
172 enable_for_templated_t<SubType, Eigen::MatrixBase, tvm::utils::LinearExpr, tvm::utils::AffineExpr> = 0>
Definition: AffineExpr.h:71
const CstDerived & constant() const
Definition: AffineExpr.h:98
const std::tuple< LinearExpr< Derived >... > & linear() const
Definition: AffineExpr.h:97
Definition: AffineExpr.h:26
const VariablePtr & variable() const
Definition: AffineExpr.h:49
const Derived & matrix() const
Definition: AffineExpr.h:48
auto tuplePremult(const MultType &m, const Tuple &tuple, std::index_sequence< Indices... >)
Definition: AffineExprDetail.h:88
auto tupleUnaryMinus(const Tuple &tuple, std::index_sequence< Indices... >)
Definition: AffineExprDetail.h:81
auto operator-(const tvm::utils::LinearExpr< Derived > &lin)
Definition: AffineExprOperators.h:15
AffineExpr< CstDerived, Derived... > make_AffineExpr(const CstDerived &constant, const std::tuple< LinearExpr< Derived >... > &linear)
Definition: AffineExpr.h:118
tvm::utils::AffineExpr< CstDerived, Derived > operator+(const tvm::utils::LinearExpr< Derived > &lin, const Eigen::MatrixBase< CstDerived > &cst)
Definition: AffineExprOperators.h:40
auto operator*(const MultDerived &m, const tvm::utils::AffineExpr< CstDerived, Derived... > &aff)
Definition: AffineExprOperators.h:32
std::shared_ptr< Variable > VariablePtr
Definition: defs.h:65
tvm::utils::LinearExpr< tvm::utils::internal::MinusIdentityType > operator-(const tvm::VariablePtr &v)
Definition: AffineExprOperators.h:124
tvm::utils::LinearExpr< Derived > operator*(const Eigen::MatrixBase< Derived > &matrix, const tvm::VariablePtr &v)
Definition: AffineExprOperators.h:120
auto operator+(const tvm::VariablePtr &u, const tvm::VariablePtr &v)
Definition: AffineExprOperators.h:135