TVM  0.9.4
tvm::scheme::abstract::ResolutionScheme< Derived > Class Template Reference

#include <tvm/scheme/abstract/ResolutionScheme.h>

Inheritance diagram for tvm::scheme::abstract::ResolutionScheme< Derived >:
Collaboration diagram for tvm::scheme::abstract::ResolutionScheme< Derived >:

Public Member Functions

template<typename Problem >
bool solve (Problem &problem) const
 
template<typename Problem >
std::unique_ptr< internal::ProblemComputationDatacreateComputationData (const Problem &problem) const
 
template<typename Problem >
void updateComputationData (const Problem &problem, internal::ProblemComputationData *data) const
 
Derived & derived ()
 
const Derived & derived () const
 
- Public Member Functions inherited from tvm::scheme::internal::ResolutionSchemeBase
double big_number () const
 
void big_number (double big)
 
- Public Member Functions inherited from tvm::internal::ObjWithId
 ObjWithId (const ObjWithId &)=delete
 
 ObjWithId (ObjWithId &&other)
 
ObjWithIdoperator= (const ObjWithId &)=delete
 
ObjWithIdoperator= (ObjWithId &&other)
 
int id () const
 

Protected Member Functions

 ResolutionScheme (internal::SchemeAbilities abilities, double big=constant::big_number)
 
- Protected Member Functions inherited from tvm::scheme::internal::ResolutionSchemeBase
 ResolutionSchemeBase (SchemeAbilities abilities, double big=constant::big_number)
 
- Protected Member Functions inherited from tvm::internal::ObjWithId
 ObjWithId ()
 

Additional Inherited Members

- Protected Attributes inherited from tvm::scheme::internal::ResolutionSchemeBase
SchemeAbilities abilities_
 
double big_number_
 

Detailed Description

template<typename Derived>
class tvm::scheme::abstract::ResolutionScheme< Derived >

Resolution schemes may be defined only for a particular type of problems. We use CRTP for providing a common interface despite this, and performing some basic common operations.

The Derived class must provide:

  • one or several void solve_(ProblemType&, ComputationData&) methods (several if it handle differently several types of problems).
  • likewise, one or several createComputationData_(const ProblemType&) methods returning a std::unique_ptr<ComputationDataType> where ComputationDataType derives from ProblemComputationData.

For a given problem, the solve_ methods is guaranteed to receive the ComputationData instance created by createComputationData_ for the same problem.

Constructor & Destructor Documentation

◆ ResolutionScheme()

template<typename Derived >
tvm::scheme::abstract::ResolutionScheme< Derived >::ResolutionScheme ( internal::SchemeAbilities  abilities,
double  big = constant::big_number 
)
inlineprotected

Member Function Documentation

◆ createComputationData()

template<typename Derived >
template<typename Problem >
std::unique_ptr< internal::ProblemComputationData > tvm::scheme::abstract::ResolutionScheme< Derived >::createComputationData ( const Problem &  problem) const
inline

◆ derived() [1/2]

template<typename Derived >
Derived& tvm::scheme::abstract::ResolutionScheme< Derived >::derived ( )
inline

Returns a reference to the derived object

◆ derived() [2/2]

template<typename Derived >
const Derived& tvm::scheme::abstract::ResolutionScheme< Derived >::derived ( ) const
inline

Returns a const reference to the derived object

◆ solve()

template<typename Derived >
template<typename Problem >
bool tvm::scheme::abstract::ResolutionScheme< Derived >::solve ( Problem &  problem) const
inline

◆ updateComputationData()

template<typename Derived >
template<typename Problem >
void tvm::scheme::abstract::ResolutionScheme< Derived >::updateComputationData ( const Problem &  problem,
internal::ProblemComputationData data 
) const

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