Generated on Sat May 25 2013 18:00:45 for Gecode by doxygen 1.8.3.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...
 
void init (int n, double d)
 Initialize for n views with decay factor d. 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)
 Initialize for views x and decay factor d. More...
 
template<class View >
void init (Home home, ViewArray< View > &x, double d)
 Initialize for views x and decay factor d. More...
 
bool initialized (void) const
 Test whether already initialized. 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 328 of file activity.hpp.

Gecode::Activity::Activity ( const Activity a)

Copy constructor.

Definition at line 50 of file activity.cpp.

template<class View >
Gecode::Activity::Activity ( Home  home,
ViewArray< View > &  x,
double  d 
)
inline

Initialize for views x and decay factor d.

Definition at line 337 of file activity.hpp.

Gecode::Activity::~Activity ( void  )

Destructor.

Definition at line 80 of file activity.cpp.

Member Function Documentation

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

Update activity value at position i.

Definition at line 296 of file activity.hpp.

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

Decay activity value at position i.

Definition at line 302 of file activity.hpp.

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

Acquire mutex.

Definition at line 318 of file activity.hpp.

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

Release mutex.

Definition at line 322 of file activity.hpp.

void Gecode::Activity::init ( int  n,
double  d 
)
protected

Initialize for n views with decay factor d.

This member function can only be used once and only if the activity storage has been constructed with the default constructor.

Definition at line 45 of file activity.cpp.

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

Assignment operator.

Definition at line 60 of file activity.cpp.

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

Initialize for views x and decay factor d.

Definition at line 343 of file activity.hpp.

bool Gecode::Activity::initialized ( void  ) const
inline

Test whether already initialized.

Definition at line 331 of file activity.hpp.

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

Updating during cloning.

Definition at line 92 of file activity.cpp.

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

Return activity value at position i.

Definition at line 308 of file activity.hpp.

int Gecode::Activity::size ( void  ) const
inline

Return number of activity values.

Definition at line 314 of file activity.hpp.

void Gecode::Activity::decay ( Space home,
double  d 
)

Set decay factor to d.

Definition at line 100 of file activity.cpp.

double Gecode::Activity::decay ( const Space home) const

Return decay factor.

Definition at line 109 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 350 of file activity.hpp.

Member Data Documentation

Storage* Gecode::Activity::storage
protected

Pointer to storage object.

Definition at line 72 of file activity.hpp.

const Activity Gecode::Activity::def
static

Default (empty) activity information.

Definition at line 116 of file activity.hpp.


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