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 <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, 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 68 of file merit.hpp.
Member Typedef Documentation
template<class View >
| typedef BranchTraits<Var>::Merit Gecode::MeritFunction< View >::Function |
Constructor & Destructor Documentation
template<class View >
| Gecode::MeritFunction< View >::MeritFunction | ( | Space & | home, | |
| const VarBranch< Var > & | vb | |||
| ) |
Constructor for initialization.
template<class View >
| Gecode::MeritFunction< View >::MeritFunction | ( | Space & | home, | |
| MeritFunction< View > & | mf | |||
| ) | [inline] |
Member Function Documentation
template<class View >
| double Gecode::MeritFunction< View >::operator() | ( | const Space & | home, | |
| View | x, | |||
| int | i | |||
| ) | [inline] |
template<class View >
| 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 >.
template<class View >
| void Gecode::MeritFunction< View >::dispose | ( | Space & | home | ) | [inline] |
Delete view merit class.
Reimplemented from Gecode::MeritBase< View, double >.
Member Data Documentation
template<class View >
SharedData<Function> Gecode::MeritFunction< View >::f [protected] |
The documentation for this class was generated from the following file:
- gecode/kernel/branch/merit.hpp
