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

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

(Note that these are not member symbols.)
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.

## Constructors and initialization

static const Action | def
| Default (empty) action information.
| 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.

## Information access

double | operator[] (int i) const
| Return action value at position i.
int | size (void) const
| Return number of action values.

## Decay factor for aging

void | decay (Space &home, double d)
| Set decay factor to d.
double | decay (const Space &home) const
| Return decay factor.

## Additional Inherited Members

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.

## Detailed Description

Class for action management.

Definition at line 42 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 323 of file action.hpp.

## Action() [2/3]

Gecode::Action::Action | ( | const Action & | a | ) |

Copy constructor.

Definition at line 46 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 327 of file action.hpp.

## ~Action()

Gecode::Action::~Action | ( | void |  | ) |

Destructor.

Definition at line 55 of file action.cpp.

## Member Function Documentation

## object() [1/2]

Action::Storage & Gecode::Action::object | ( | void |  | ) | const

inline protected

Return object of correct type.

Definition at line 290 of file action.hpp.

## object() [2/2]

void Gecode::Action::object | ( | Action::Storage & | o | ) |

inline protected

Set object to o.

Definition at line 295 of file action.hpp.

## update()

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

inline protected

Update action value at position i.

Definition at line 300 of file action.hpp.

## acquire()

void Gecode::Action::acquire | ( | void |  | ) |

inline protected

Acquire mutex.

Definition at line 313 of file action.hpp.

## release()

void Gecode::Action::release | ( | void |  | ) |

inline protected

Release mutex.

Definition at line 317 of file action.hpp.

## operator=()

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

Assignment operator.

Definition at line 50 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 335 of file action.hpp.

## operator[]()

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

inline

Return action value at position i.

Definition at line 304 of file action.hpp.

## size()

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

inline

Return number of action values.

Definition at line 309 of file action.hpp.

## decay() [1/2]

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

Set decay factor to d.

Definition at line 58 of file action.cpp.

## decay() [2/2]

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

Return decay factor.

Definition at line 67 of file action.cpp.

## Friends And Related Symbol 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 335 of file action.hpp.

## Member Data Documentation

## def

const Action Gecode::Action::def

static

Default (empty) action information.

Definition at line 103 of file action.hpp.

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

- gecode/kernel/branch/action.hpp
- gecode/kernel/branch/action.cpp