gecode中的meritbase
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了gecode中的meritbase相关的知识,希望对你有一定的参考价值。
这个类只是个基类,并没有实现什么,主要作用是给子类提供统一的接口
/** * \defgroup TaskBranchMerit Generic merit for branchers based on view and value selection * * \ingroup TaskBranchViewVal */ //@{ /** * \brief Base-class for merit class */ template<class _View, class _Val> class MeritBase { public: /// View type typedef _View View; /// Type of merit typedef _Val Val; /// Constructor for initialization MeritBase(Space& home, const VarBranch& vb); /// Constructor for cloning MeritBase(Space& home, bool share, MeritBase& mb); /// Whether dispose must always be called (that is, notice is needed) bool notice(void) const; /// Delete view merit class void dispose(Space& home); };
// Merit base class template<class View, class Val> forceinline MeritBase<View,Val>::MeritBase(Space&, const VarBranch&) {} template<class View, class Val> forceinline MeritBase<View,Val>::MeritBase(Space&, bool, MeritBase&) {} template<class View, class Val> forceinline bool MeritBase<View,Val>::notice(void) const { return false; } template<class View, class Val> forceinline void MeritBase<View,Val>::dispose(Space&) {}
以上是关于gecode中的meritbase的主要内容,如果未能解决你的问题,请参考以下文章