Generated on Wed Jan 24 2018 21:22:26 for Gecode by doxygen 1.8.13
Gecode::Action Class Reference

Class for action management. More...

#include <action.hpp>

Classes

class  Recorder
 Propagator for recording action information. More...
 
class  Storage
 Object for storing action values. More...
 

Protected Member Functions

void update (int i)
 Update action 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 Action &a)
 Print action values enclosed in curly brackets. More...
 

Constructors and initialization

static const Action def
 Default (empty) action information. More...
 
 Action (void)
 Construct as not yet intialized. More...
 
 Action (const Action &a)
 Copy constructor. More...
 
Actionoperator= (const Action &a)
 Assignment operator. More...
 
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. 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 action as defined by bm. More...
 
 operator bool (void) const
 Test whether already initialized. More...
 

Update and delete action information

void update (Space &home, bool share, Action &a)
 Updating during cloning. More...
 
 ~Action (void)
 Destructor. More...
 

Information access

double operator[] (int i) const
 Return action value at position i. More...
 
int size (void) const
 Return number of action 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 action management.

Definition at line 46 of file action.hpp.

Constructor & Destructor Documentation

◆ Action() [1/3]

Gecode::Action::Action ( void  )
inline

Construct as not yet intialized.

The only member functions that can be used on a constructed but not yet initialized action storage is init and the assignment operator.

Definition at line 329 of file action.hpp.

◆ Action() [2/3]

Gecode::Action::Action ( const Action a)

Copy constructor.

Definition at line 44 of file action.cpp.

◆ Action() [3/3]

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

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

Definition at line 338 of file action.hpp.

◆ ~Action()

Gecode::Action::~Action ( void  )

Destructor.

Definition at line 74 of file action.cpp.

Member Function Documentation

◆ update() [1/2]

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

Update action value at position i.

Definition at line 306 of file action.hpp.

◆ acquire()

void Gecode::Action::acquire ( void  )
inlineprotected

Acquire mutex.

Definition at line 319 of file action.hpp.

◆ release()

void Gecode::Action::release ( void  )
inlineprotected

Release mutex.

Definition at line 323 of file action.hpp.

◆ operator=()

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

Assignment operator.

Definition at line 54 of file action.cpp.

◆ init()

template<class View >
void Gecode::Action::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 action as defined by bm.

Definition at line 346 of file action.hpp.

◆ operator bool()

Gecode::Action::operator bool ( void  ) const
inline

Test whether already initialized.

Definition at line 332 of file action.hpp.

◆ update() [2/2]

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

Updating during cloning.

Definition at line 86 of file action.cpp.

◆ operator[]()

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

Return action value at position i.

Definition at line 310 of file action.hpp.

◆ size()

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

Return number of action values.

Definition at line 315 of file action.hpp.

◆ decay() [1/2]

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

Set decay factor to d.

Definition at line 94 of file action.cpp.

◆ decay() [2/2]

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

Return decay factor.

Definition at line 103 of file action.cpp.

Friends And Related Function Documentation

◆ operator<<()

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

Print action values enclosed in curly brackets.

Definition at line 355 of file action.hpp.

Member Data Documentation

◆ storage

Storage* Gecode::Action::storage
protected

Pointer to storage object.

Definition at line 74 of file action.hpp.

◆ def

const Action Gecode::Action::def
static

Default (empty) action information.

Definition at line 109 of file action.hpp.


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