Recording actions for set variables. More...
#include <set.hh>
Public Member Functions | |
SetAction (void) | |
Construct as not yet initialized. | |
Copy constructor | SetAction (const SetAction &a) |
Assignment | operator SetAction &operator= (const SetAction &a) |
SetAction (Home home, const SetVarArgs &x, double d=1.0, SetBranchMerit bm=nullptr) | |
Initialize for set variables x with decay factor d. | |
void | init (Home home, const SetVarArgs &x, double d=1.0, SetBranchMerit bm=nullptr) |
Initialize for set variables x with decay factor d. | |
Action (void) | |
Construct as not yet intialized. | |
Action (const Action &a) | |
Copy constructor. | |
Action & | operator= (const Action &a) |
Assignment operator. | |
template<class View> | |
Action (Home home, ViewArray< View > &x, double d, typename BranchTraits< typename View::VarType >::Merit bm) | |
Initialize for views x and decay factor d and action as defined by bm. | |
template<class View> | |
void | init (Home home, ViewArray< View > &x, double d, typename BranchTraits< typename View::VarType >::Merit bm) |
Initialize for views x and decay factor d and action as defined by bm. | |
~Action (void) | |
Destructor. | |
double | operator[] (int i) const |
Return action value at position i. | |
int | size (void) const |
Return number of action values. | |
void | decay (Space &home, double d) |
Set decay factor to d. | |
double | decay (const Space &home) const |
Return decay factor. | |
Public Member Functions inherited from Gecode::SharedHandle | |
SharedHandle (void) | |
Create shared handle with no object pointing to. | |
SharedHandle (SharedHandle::Object *so) | |
Create shared handle that points to shared object so. | |
SharedHandle (const SharedHandle &sh) | |
Copy constructor maintaining reference count. | |
SharedHandle & | operator= (const SharedHandle &sh) |
Assignment operator maintaining reference count. | |
~SharedHandle (void) | |
Destructor that maintains reference count. | |
operator bool (void) const | |
Whether handle points to an object. |
Additional Inherited Members | |
static const Action | def |
Default (empty) action information. | |
Protected Member Functions inherited from Gecode::Action | |
Storage & | object (void) const |
Return object of correct type. | |
void | object (Storage &o) |
Set object to o. | |
void | update (int i) |
Update action value at position i. | |
void | acquire (void) |
Acquire mutex. | |
void | release (void) |
Release mutex. | |
Protected Member Functions inherited from Gecode::SharedHandle | |
SharedHandle::Object * | object (void) const |
Access to the shared object. | |
void | object (SharedHandle::Object *n) |
Modify shared object. | |
Related Symbols inherited from Gecode::Action | |
template<class Char, class Traits> | |
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const Action &a) |
Print action values enclosed in curly brackets. |
|
inline |
Construct as not yet initialized.
The only member functions that can be used on a constructed but not yet initialized action storage is init or the assignment operator.
Definition at line 37 of file action.hpp.
|
inline |
Definition at line 40 of file action.hpp.
Gecode::SetAction::SetAction | ( | Home | home, |
const SetVarArgs & | x, | ||
double | d = 1.0, | ||
SetBranchMerit | bm = nullptr ) |
Initialize for set variables x with decay factor d.
If the branch merit function bm is different from nullptr, the action for each variable is initialized with the merit returned by bm.
Definition at line 38 of file action.cpp.
void Gecode::SetAction::init | ( | Home | home, |
const SetVarArgs & | x, | ||
double | d = 1.0, | ||
SetBranchMerit | bm = nullptr ) |
Initialize for set variables x with decay factor d.
If the branch merit function bm is different from nullptr, the action for each variable is initialized with the merit returned by bm.
This member function can only be used once and only if the action storage has been constructed with the default constructor.
Definition at line 45 of file action.cpp.