Merit class for user-defined merit function. More...
#include <merit.hpp>
Public Types | |
typedef BranchTraits< Var >::Merit | Function |
Corresponding merit function type. | |
![]() | |
typedef View | View |
View type. | |
typedef View::VarType | Var |
Corresponding variable type. | |
typedef double | Val |
Type of merit. | |
Public Member Functions | |
MeritFunction (Space &home, const VarBranch< Var > &vb) | |
Constructor for initialization. | |
MeritFunction (Space &home, MeritFunction &mf) | |
Constructor for cloning. | |
double | operator() (const Space &home, View x, int i) |
Return degree as merit for view x at position i. | |
bool | notice (void) const |
Whether dispose must always be called (that is, notice is needed) | |
void | dispose (Space &home) |
Delete view merit class. | |
![]() | |
MeritBase (Space &home, const VarBranch< Var > &vb) | |
Constructor for initialization. | |
MeritBase (Space &home, MeritBase &mb) | |
Constructor for cloning. | |
bool | notice (void) const |
Whether dispose must always be called (that is, notice is needed) | |
void | dispose (Space &home) |
Delete view merit class. | |
Protected Attributes | |
SharedData< Function > | f |
The user-defined merit function. | |
Merit class for user-defined merit function.
BranchTraits<Var>::Merit Gecode::MeritFunction< View >::Function |
Gecode::MeritFunction< View >::MeritFunction | ( | Space & | home, |
const VarBranch< Var > & | vb ) |
Constructor for initialization.
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |