|
template<class T = CstDerived, typename std::enable_if_t< std::is_same_v< T, internal::NoConstant >, int > = 0> |
| AffineExpr (const LinearExpr< Derived > &... linear) |
|
template<class T = CstDerived, typename std::enable_if_t<!std::is_same_v< T, internal::NoConstant >, int > = 0> |
| AffineExpr (const Eigen::MatrixBase< CstDerived > &constant, const LinearExpr< Derived > &... linear) |
|
template<class T = CstDerived, typename std::enable_if_t< std::is_same_v< T, internal::NoConstant >, int > = 0> |
| AffineExpr (const internal::NoConstant &constant, const std::tuple< LinearExpr< Derived >... > &linear) |
|
template<class T = CstDerived, typename std::enable_if_t<!std::is_same_v< T, internal::NoConstant >, int > = 0> |
| AffineExpr (const Eigen::MatrixBase< CstDerived > &constant, const std::tuple< LinearExpr< Derived >... > &linear) |
|
const std::tuple< LinearExpr< Derived >... > & | linear () const |
|
const CstDerived & | constant () const |
|
template<typename CstDerived, typename... Derived>
class tvm::utils::AffineExpr< CstDerived, Derived >
A class representing an affine expression \( A_1 x_1 + A_2 x_2 + \ldots + A_k x_k + b \) where \( A_i \) is a matrix expression, \( x_i \) is a Variable and \( b \) is a vector expression.
The class is essentially a list of LinearExpr in the form of a std:::tuple, and a vector expression.
- Template Parameters
-
CstDerived | The type of the constant part. Possibly NoConstant, otherwise an Eigen expression type with the characteristics of a vector. |
Derived | The list of matrix expression types corresponding to each Ai |
template<typename CstDerived , typename... Derived>
template<class T = CstDerived, typename std::enable_if_t< std::is_same_v< T, internal::NoConstant >, int > = 0>
Construction from a sequence of LinearExpr, in the case of CstDerived == NoConstant (absent constant part).
template<typename CstDerived , typename... Derived>
template<class T = CstDerived, typename std::enable_if_t<!std::is_same_v< T, internal::NoConstant >, int > = 0>
Construction from a sequence of LinearExpr, in the case of CstDerived != NoConstant (existing constant part).
template<typename CstDerived , typename... Derived>
template<class T = CstDerived, typename std::enable_if_t<!std::is_same_v< T, internal::NoConstant >, int > = 0>
Construction from a tuple of LinearExpr, in the case of CstDerived != NoConstant (existing constant part).