
Class for activity management. More...
#include <activity.hpp>
Classes | |
| class | Recorder |
| Propagator for recording activity information. More... | |
| class | Storage |
| Object for storing activity values. More... | |
Protected Member Functions | |
| void | update (int i) |
| Update activity value at position i. More... | |
| void | decay (int i) |
| Decay activity value at position i. More... | |
| void | acquire (void) |
| Acquire mutex. More... | |
| void | release (void) |
| Release mutex. More... | |
Protected Attributes | |
| Storage * | storage |
| Pointer to storage object. More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Char , class Traits > | |
| std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const Activity &a) |
| Print activity values enclosed in curly brackets. More... | |
Constructors and initialization | |
| static const Activity | def |
| Default (empty) activity information. More... | |
| Activity (void) | |
| Construct as not yet intialized. More... | |
| Activity (const Activity &a) | |
| Copy constructor. More... | |
| Activity & | operator= (const Activity &a) |
| Assignment operator. More... | |
| template<class View > | |
| Activity (Home home, ViewArray< View > &x, double d, typename BranchTraits< typename View::VarType >::Merit bm) | |
| Initialize for views x and decay factor d and activity as defined by bm. More... | |
| 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 activity as defined by bm. More... | |
| bool | initialized (void) const |
| Test whether already initialized. More... | |
| void | set (Space &home, double a=0.0) |
| Set activity to a. More... | |
Update and delete activity information | |
| void | update (Space &home, bool share, Activity &a) |
| Updating during cloning. More... | |
| ~Activity (void) | |
| Destructor. More... | |
Information access | |
| double | operator[] (int i) const |
| Return activity value at position i. More... | |
| int | size (void) const |
| Return number of activity values. More... | |
Decay factor for aging | |
| void | decay (Space &home, double d) |
| Set decay factor to d. More... | |
| double | decay (const Space &home) const |
| Return decay factor. More... | |
Class for activity management.
Definition at line 44 of file activity.hpp.
|
inline |
Construct as not yet intialized.
The only member functions that can be used on a constructed but not yet initialized activity storage is init and the assignment operator.
Definition at line 335 of file activity.hpp.
| Gecode::Activity::Activity | ( | const Activity & | a | ) |
Copy constructor.
Definition at line 44 of file activity.cpp.
|
inline |
Initialize for views x and decay factor d and activity as defined by bm.
Definition at line 344 of file activity.hpp.
| Gecode::Activity::~Activity | ( | void | ) |
Destructor.
Definition at line 74 of file activity.cpp.
|
inlineprotected |
Update activity value at position i.
Definition at line 303 of file activity.hpp.
|
inlineprotected |
Decay activity value at position i.
Definition at line 309 of file activity.hpp.
|
inlineprotected |
Acquire mutex.
Definition at line 325 of file activity.hpp.
|
inlineprotected |
Release mutex.
Definition at line 329 of file activity.hpp.
Assignment operator.
Definition at line 54 of file activity.cpp.
|
inline |
Initialize for views x and decay factor d and activity as defined by bm.
Definition at line 352 of file activity.hpp.
|
inline |
Test whether already initialized.
Definition at line 338 of file activity.hpp.
| void Gecode::Activity::set | ( | Space & | home, |
| double | a = 0.0 |
||
| ) |
Set activity to a.
Definition at line 94 of file activity.cpp.
Updating during cloning.
Definition at line 86 of file activity.cpp.
|
inline |
Return activity value at position i.
Definition at line 315 of file activity.hpp.
|
inline |
Return number of activity values.
Definition at line 321 of file activity.hpp.
| void Gecode::Activity::decay | ( | Space & | home, |
| double | d | ||
| ) |
Set decay factor to d.
Definition at line 102 of file activity.cpp.
| double Gecode::Activity::decay | ( | const Space & | home | ) | const |
Return decay factor.
Definition at line 111 of file activity.cpp.
|
related |
Print activity values enclosed in curly brackets.
Definition at line 361 of file activity.hpp.
|
protected |
Pointer to storage object.
Definition at line 74 of file activity.hpp.
|
static |
Default (empty) activity information.
Definition at line 114 of file activity.hpp.