TVM  0.9.4
tvm::hint::Substitution Class Reference

#include <tvm/hint/Substitution.h>

Public Member Functions

 Substitution (LinearConstraintPtr cstr, VariablePtr x, int rank=constant::fullRank, const abstract::SubstitutionCalculator &calc=internal::AutoCalculator())
 
 Substitution (const std::vector< LinearConstraintPtr > &cstr, VariablePtr x, int rank=constant::fullRank, const abstract::SubstitutionCalculator &calc=internal::AutoCalculator())
 
 Substitution (LinearConstraintPtr cstr, std::vector< VariablePtr > &x, int rank=constant::fullRank, const abstract::SubstitutionCalculator &calc=internal::AutoCalculator())
 
 Substitution (const std::vector< LinearConstraintPtr > &cstr, const std::vector< VariablePtr > &x, int rank=constant::fullRank, const abstract::SubstitutionCalculator &calc=internal::AutoCalculator())
 
int rank () const
 
int m () const
 
const std::vector< LinearConstraintPtr > & constraints () const
 
const std::vector< VariablePtr > & variables () const
 
bool isSimple () const
 
std::shared_ptr< abstract::SubstitutionCalculatorImplcalculator () const
 

Detailed Description

Hint for a substitution that could be done by the solver. A substitution is a set of variables and a set of constraints used to presolve them, which allow to effectively removing them from the problem.

Constructor & Destructor Documentation

◆ Substitution() [1/4]

tvm::hint::Substitution::Substitution ( LinearConstraintPtr  cstr,
VariablePtr  x,
int  rank = constant::fullRank,
const abstract::SubstitutionCalculator calc = internal::AutoCalculator() 
)

Constructor for a single constraint and a single variable

Parameters
cstrThe constraint used for the substitution.
xThe variable to substitute.
rankthe rank of the matrix multiplying x. By default it is the row size of this matrix.
calcA class that performs matrix operations related to the substitution
See also
tvm::hint::abstract::SubstitutionCalculator, tvm::hint::abstract::SubstitutionCalculatorImpl
Attention
Rank matters and is supposed to be fixed. This is because it is influencing the size of other matrices in the problem. However, the matrix doesn't need to be full rank.

◆ Substitution() [2/4]

tvm::hint::Substitution::Substitution ( const std::vector< LinearConstraintPtr > &  cstr,
VariablePtr  x,
int  rank = constant::fullRank,
const abstract::SubstitutionCalculator calc = internal::AutoCalculator() 
)

Constructor for a set of constraints and a single variable

Parameters
cstrThe set of constraints used for the substitution.
xThe variable to substitute.
rankthe rank of the matrix multiplying x obtained by stacking the matrices in factor of x in each constraint. By default it is the row size of this matrix.
calcA class that performs matrix operations related to the substitution
See also
tvm::hint::abstract::SubstitutionCalculator, tvm::hint::abstract::SubstitutionCalculatorImpl
Attention
Rank matters and is supposed to be fixed. This is because it is influencing the size of other matrices in the problem. However, the matrix doesn't need to be full rank.

◆ Substitution() [3/4]

tvm::hint::Substitution::Substitution ( LinearConstraintPtr  cstr,
std::vector< VariablePtr > &  x,
int  rank = constant::fullRank,
const abstract::SubstitutionCalculator calc = internal::AutoCalculator() 
)

Constructor for a single constraint and a set of variables

Parameters
cstrThe constraint used for the substitution.
xThe set variables to substitute.
rankthe rank of the matrices multiplying x obtained by concatenating the matrices in front of each xi. By default it is the row size of this matrix.
calcA class that performs matrix operations related to the substitution
See also
tvm::hint::abstract::SubstitutionCalculator, tvm::hint::abstract::SubstitutionCalculatorImpl
Attention
Rank matters and is supposed to be fixed. This is because it is influencing the size of other matrices in the problem. However, the matrix doesn't need to be full rank.

◆ Substitution() [4/4]

tvm::hint::Substitution::Substitution ( const std::vector< LinearConstraintPtr > &  cstr,
const std::vector< VariablePtr > &  x,
int  rank = constant::fullRank,
const abstract::SubstitutionCalculator calc = internal::AutoCalculator() 
)

Constructor for a set of constraints and a set of variables

Parameters
cstrThe set of constraints used for the substitution.
xThe set variables to substitute.
rankthe rank of the matrix multiplying x, i.e the aggregation of all the matrices in front of the xi in all the constraints. By default, it is the row size of this matrix.
calcA class that performs matrix operations related to the substitution
See also
tvm::hint::abstract::SubstitutionCalculator, tvm::hint::abstract::SubstitutionCalculatorImpl
Attention
Rank matters and is supposed to be fixed. This is because it is influencing the size of other matrices in the problem. However, the matrix doesn't need to be full rank.

Member Function Documentation

◆ calculator()

std::shared_ptr<abstract::SubstitutionCalculatorImpl> tvm::hint::Substitution::calculator ( ) const

Return the calculator used by this substitution.

◆ constraints()

const std::vector<LinearConstraintPtr>& tvm::hint::Substitution::constraints ( ) const

The set of constraints used in the substitution.

◆ isSimple()

bool tvm::hint::Substitution::isSimple ( ) const

Return true is this substitution is based on a single constraint and a single variable.

◆ m()

int tvm::hint::Substitution::m ( ) const

The total (row) size of the constraints.

◆ rank()

int tvm::hint::Substitution::rank ( ) const

The rank of the matrix multiplying x.

◆ variables()

const std::vector<VariablePtr>& tvm::hint::Substitution::variables ( ) const

The set of variables to substitute


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