Generated on Sat Feb 7 2015 02:01:39 for Gecode by doxygen 1.8.9.1
Gecode::Activity Class Reference

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

Storagestorage
 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...
 
Activityoperator= (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...
 

Detailed Description

Class for activity management.

Definition at line 44 of file activity.hpp.

Constructor & Destructor Documentation

Gecode::Activity::Activity ( void  )
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.

template<class View >
Gecode::Activity::Activity ( Home  home,
ViewArray< View > &  x,
double  d,
typename BranchTraits< typename View::VarType >::Merit  bm 
)
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.

Member Function Documentation

void Gecode::Activity::update ( int  i)
inlineprotected

Update activity value at position i.

Definition at line 303 of file activity.hpp.

void Gecode::Activity::decay ( int  i)
inlineprotected

Decay activity value at position i.

Definition at line 309 of file activity.hpp.

void Gecode::Activity::acquire ( void  )
inlineprotected

Acquire mutex.

Definition at line 325 of file activity.hpp.

void Gecode::Activity::release ( void  )
inlineprotected

Release mutex.

Definition at line 329 of file activity.hpp.

Activity & Gecode::Activity::operator= ( const Activity a)

Assignment operator.

Definition at line 54 of file activity.cpp.

template<class View >
void Gecode::Activity::init ( Home  home,
ViewArray< View > &  x,
double  d,
typename BranchTraits< typename View::VarType >::Merit  bm 
)
inline

Initialize for views x and decay factor d and activity as defined by bm.

Definition at line 352 of file activity.hpp.

bool Gecode::Activity::initialized ( void  ) const
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.

void Gecode::Activity::update ( Space home,
bool  share,
Activity a 
)

Updating during cloning.

Definition at line 86 of file activity.cpp.

double Gecode::Activity::operator[] ( int  i) const
inline

Return activity value at position i.

Definition at line 315 of file activity.hpp.

int Gecode::Activity::size ( void  ) const
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.

Friends And Related Function Documentation

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  os,
const Activity a 
)
related

Print activity values enclosed in curly brackets.

Definition at line 361 of file activity.hpp.

Member Data Documentation

Storage* Gecode::Activity::storage
protected

Pointer to storage object.

Definition at line 74 of file activity.hpp.

const Activity Gecode::Activity::def
static

Default (empty) activity information.

Definition at line 114 of file activity.hpp.


The documentation for this class was generated from the following files: