Gecode::MeritFunction< View > Class Template Reference
[Generic merit for branchers based on view and value selection]
Merit class for user-defined merit function. More...
#include <brancher-merit.hpp>
Public Types | |
typedef BranchTraits< Var >::Merit | Function |
Corresponding merit function type. | |
Public Member Functions | |
MeritFunction (Space &home, const VarBranch< Var > &vb) | |
Constructor for initialization. | |
MeritFunction (Space &home, bool shared, 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. | |
Protected Attributes | |
SharedData< Function > | f |
The user-defined merit function. |
Detailed Description
template<class View>
class Gecode::MeritFunction< View >
Merit class for user-defined merit function.
Definition at line 72 of file brancher-merit.hpp.
Member Typedef Documentation
typedef BranchTraits<Var>::Merit Gecode::MeritFunction< View >::Function |
Corresponding merit function type.
Definition at line 76 of file brancher-merit.hpp.
Constructor & Destructor Documentation
Gecode::MeritFunction< View >::MeritFunction | ( | Space & | home, | |
const VarBranch< Var > & | vb | |||
) | [inline] |
Constructor for initialization.
Definition at line 196 of file brancher-merit.hpp.
Gecode::MeritFunction< View >::MeritFunction | ( | Space & | home, | |
bool | shared, | |||
MeritFunction< View > & | mf | |||
) | [inline] |
Constructor for cloning.
Definition at line 203 of file brancher-merit.hpp.
Member Function Documentation
double Gecode::MeritFunction< View >::operator() | ( | const Space & | home, | |
View | x, | |||
int | i | |||
) | [inline] |
Return degree as merit for view x at position i.
Definition at line 210 of file brancher-merit.hpp.
bool Gecode::MeritFunction< View >::notice | ( | void | ) | const [inline] |
Whether dispose must always be called (that is, notice is needed).
Reimplemented from Gecode::MeritBase< View, double >.
Definition at line 217 of file brancher-merit.hpp.
void Gecode::MeritFunction< View >::dispose | ( | Space & | home | ) | [inline] |
Delete view merit class.
Reimplemented from Gecode::MeritBase< View, double >.
Definition at line 222 of file brancher-merit.hpp.
Member Data Documentation
SharedData<Function> Gecode::MeritFunction< View >::f [protected] |
The user-defined merit function.
Definition at line 79 of file brancher-merit.hpp.
The documentation for this class was generated from the following file:
- gecode/kernel/brancher-merit.hpp (Revision: 15541)