TVM  0.9.4
tvm::utils::LinearExpr< Derived > Class Template Reference

#include <tvm/utils/AffineExpr.h>

Public Member Functions

 LinearExpr (const Eigen::MatrixBase< Derived > &matrix, const VariablePtr &v)
 
template<class T = Derived, typename std::enable_if_t< std::is_same_v< T, internal::IdentityType >, int > = 0>
 LinearExpr (const tvm::VariablePtr &v)
 
template<class T = Derived, typename std::enable_if_t< std::is_same_v< T, internal::MultIdentityType >, int > = 0>
 LinearExpr (double a, const tvm::VariablePtr &v)
 
template<class T = Derived, typename std::enable_if_t< std::is_same_v< T, internal::MinusIdentityType >, int > = 0>
 LinearExpr (const tvm::VariablePtr &v)
 
const Derived & matrix () const
 
const VariablePtrvariable () const
 

Detailed Description

template<typename Derived>
class tvm::utils::LinearExpr< Derived >

A class representing an expression A * x with A a matrix expression and x a variable

Template Parameters
DerivedThe type of the matrix expression.

Constructor & Destructor Documentation

◆ LinearExpr() [1/4]

template<typename Derived >
tvm::utils::LinearExpr< Derived >::LinearExpr ( const Eigen::MatrixBase< Derived > &  matrix,
const VariablePtr v 
)
inline

General constructor

◆ LinearExpr() [2/4]

template<typename Derived >
template<class T = Derived, typename std::enable_if_t< std::is_same_v< T, internal::IdentityType >, int > = 0>
tvm::utils::LinearExpr< Derived >::LinearExpr ( const tvm::VariablePtr v)
inline

Constructor for Identity linear expression

◆ LinearExpr() [3/4]

template<typename Derived >
template<class T = Derived, typename std::enable_if_t< std::is_same_v< T, internal::MultIdentityType >, int > = 0>
tvm::utils::LinearExpr< Derived >::LinearExpr ( double  a,
const tvm::VariablePtr v 
)
inline

Constructor for a*v where a is a scalar

◆ LinearExpr() [4/4]

template<typename Derived >
template<class T = Derived, typename std::enable_if_t< std::is_same_v< T, internal::MinusIdentityType >, int > = 0>
tvm::utils::LinearExpr< Derived >::LinearExpr ( const tvm::VariablePtr v)
inline

Constructor for -v

Member Function Documentation

◆ matrix()

template<typename Derived >
const Derived& tvm::utils::LinearExpr< Derived >::matrix ( ) const
inline

◆ variable()

template<typename Derived >
const VariablePtr& tvm::utils::LinearExpr< Derived >::variable ( ) const
inline

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