TVM  0.9.2
tvm::utils::AffineExpr< CstDerived, Derived > Class Template Reference

#include <tvm/utils/AffineExpr.h>

Public Member Functions

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
 

Detailed Description

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
CstDerivedThe type of the constant part. Possibly NoConstant, otherwise an Eigen expression type with the characteristics of a vector.
DerivedThe list of matrix expression types corresponding to each Ai

Constructor & Destructor Documentation

◆ AffineExpr() [1/4]

template<typename CstDerived , typename... Derived>
template<class T = CstDerived, typename std::enable_if_t< std::is_same_v< T, internal::NoConstant >, int > = 0>
tvm::utils::AffineExpr< CstDerived, Derived >::AffineExpr ( const LinearExpr< Derived > &...  linear)
inline

Construction from a sequence of LinearExpr, in the case of CstDerived == NoConstant (absent constant part).

◆ AffineExpr() [2/4]

template<typename CstDerived , typename... Derived>
template<class T = CstDerived, typename std::enable_if_t<!std::is_same_v< T, internal::NoConstant >, int > = 0>
tvm::utils::AffineExpr< CstDerived, Derived >::AffineExpr ( const Eigen::MatrixBase< CstDerived > &  constant,
const LinearExpr< Derived > &...  linear 
)
inline

Construction from a sequence of LinearExpr, in the case of CstDerived != NoConstant (existing constant part).

◆ AffineExpr() [3/4]

template<typename CstDerived , typename... Derived>
template<class T = CstDerived, typename std::enable_if_t< std::is_same_v< T, internal::NoConstant >, int > = 0>
tvm::utils::AffineExpr< CstDerived, Derived >::AffineExpr ( const internal::NoConstant constant,
const std::tuple< LinearExpr< Derived >... > &  linear 
)
inline

Construction from a tuple of LinearExpr, in the case of CstDerived == NoConstant (absent constant part).

◆ AffineExpr() [4/4]

template<typename CstDerived , typename... Derived>
template<class T = CstDerived, typename std::enable_if_t<!std::is_same_v< T, internal::NoConstant >, int > = 0>
tvm::utils::AffineExpr< CstDerived, Derived >::AffineExpr ( const Eigen::MatrixBase< CstDerived > &  constant,
const std::tuple< LinearExpr< Derived >... > &  linear 
)
inline

Construction from a tuple of LinearExpr, in the case of CstDerived != NoConstant (existing constant part).

Member Function Documentation

◆ constant()

template<typename CstDerived , typename... Derived>
const CstDerived& tvm::utils::AffineExpr< CstDerived, Derived >::constant ( ) const
inline

◆ linear()

template<typename CstDerived , typename... Derived>
const std::tuple<LinearExpr<Derived>...>& tvm::utils::AffineExpr< CstDerived, Derived >::linear ( ) const
inline

The documentation for this class was generated from the following file: