Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0

Group of propagators. More...

#include <core.hpp>

Protected Member Functions

 PropagatorGroup (unsigned int gid)
 Initialize with group id gid.
 
- Protected Member Functions inherited from Gecode::Group
 Group (unsigned int gid0)
 Construct with predefined group id gid0.
 

Operations on groups

static PropagatorGroup all
 Group of all propagators.
 
static PropagatorGroup def
 Group of propagators not in any user-defined group.
 
bool operator== (PropagatorGroup g) const
 Test whether this group is equal to group g.
 
bool operator!= (PropagatorGroup g) const
 Test whether this group is different from group g.
 
unsigned int size (Space &home) const
 Return number of propagators in a group.
 
void kill (Space &home)
 Kill all propagators in a group.
 
void disable (Space &home)
 Disable all propagators in a group.
 
void enable (Space &home, bool s=true)
 Enable all propagators in a group.
 

Construction

 PropagatorGroup (void)
 Constructor.
 
 PropagatorGroup (const PropagatorGroup &g)
 Copy constructor.
 
PropagatorGroupoperator= (const PropagatorGroup &g)
 Assignment operator.
 
Home operator() (Space &home)
 To augment a space argument.
 

Move propagators between groups

PropagatorGroupmove (Space &home, PropagatorGroup g)
 Move propagators from group g to this group.
 
PropagatorGroupmove (Space &home, Propagator &p)
 Move propagator p to this group.
 
PropagatorGroupmove (Space &home, unsigned int id)
 Move propagator with id id to this group.
 

Additional Inherited Members

- Public Member Functions inherited from Gecode::Group
 Group (void)
 Constructor.
 
 Group (const Group &g)
 Copy constructor.
 
Groupoperator= (const Group &g)
 Assignment operator.
 
unsigned int id (void) const
 Return a unique id for the group.
 
bool in (Group a) const
 Check whether actor group a is included in this group.
 
bool in (void) const
 Check whether this is a real group (and not just default)
 
- Static Public Attributes inherited from Gecode::Group
static Group all
 Group of all actors.
 
static Group def
 Group of actors not in any user-defined group.
 
- Protected Attributes inherited from Gecode::Group
unsigned int gid
 The group id.
 
- Static Protected Attributes inherited from Gecode::Group
static const unsigned int GROUPID_ALL = 0U
 Fake id for group of all actors.
 
static const unsigned int GROUPID_DEF = 1U
 Pre-defined default group id.
 
static const unsigned int GROUPID_MAX = UINT_MAX >> 2
 The maximal group number.
 
static unsigned int next = GROUPID_DEF+1
 Next group id.
 
static Support::Mutex m
 Mutex for protection.
 

Detailed Description

Group of propagators.

Definition at line 727 of file core.hpp.

Constructor & Destructor Documentation

◆ PropagatorGroup() [1/3]

Gecode::PropagatorGroup::PropagatorGroup ( unsigned int gid)
inlineprotected

Initialize with group id gid.

Definition at line 4983 of file core.hpp.

◆ PropagatorGroup() [2/3]

Gecode::PropagatorGroup::PropagatorGroup ( void )
inline

Constructor.

Definition at line 4980 of file core.hpp.

◆ PropagatorGroup() [3/3]

Gecode::PropagatorGroup::PropagatorGroup ( const PropagatorGroup & g)
inline

Copy constructor.

Definition at line 4987 of file core.hpp.

Member Function Documentation

◆ operator=()

PropagatorGroup & Gecode::PropagatorGroup::operator= ( const PropagatorGroup & g)
inline

Assignment operator.

Definition at line 4991 of file core.hpp.

◆ operator()()

Home Gecode::PropagatorGroup::operator() ( Space & home)
inline

To augment a space argument.

Definition at line 4996 of file core.hpp.

◆ move() [1/3]

PropagatorGroup & Gecode::PropagatorGroup::move ( Space & home,
PropagatorGroup g )

Move propagators from group g to this group.

Definition at line 932 of file core.cpp.

◆ move() [2/3]

PropagatorGroup & Gecode::PropagatorGroup::move ( Space & home,
Propagator & p )
inline

Move propagator p to this group.

Definition at line 5010 of file core.hpp.

◆ move() [3/3]

PropagatorGroup & Gecode::PropagatorGroup::move ( Space & home,
unsigned int id )

Move propagator with id id to this group.

Throws an exception of type UnknownPropagator, if no propagator with id id exists.

Definition at line 941 of file core.cpp.

◆ operator==()

bool Gecode::PropagatorGroup::operator== ( PropagatorGroup g) const
inline

Test whether this group is equal to group g.

Definition at line 5001 of file core.hpp.

◆ operator!=()

bool Gecode::PropagatorGroup::operator!= ( PropagatorGroup g) const
inline

Test whether this group is different from group g.

Definition at line 5005 of file core.hpp.

◆ size()

unsigned int Gecode::PropagatorGroup::size ( Space & home) const

Return number of propagators in a group.

Definition at line 955 of file core.cpp.

◆ kill()

void Gecode::PropagatorGroup::kill ( Space & home)

Kill all propagators in a group.

Definition at line 966 of file core.cpp.

◆ disable()

void Gecode::PropagatorGroup::disable ( Space & home)

Disable all propagators in a group.

Definition at line 979 of file core.cpp.

◆ enable()

void Gecode::PropagatorGroup::enable ( Space & home,
bool s = true )

Enable all propagators in a group.

If s is true, the propagators will be scheduled for propagation if needed.

Definition at line 988 of file core.cpp.

Member Data Documentation

◆ all

PropagatorGroup Gecode::PropagatorGroup::all
static

Group of all propagators.

Definition at line 789 of file core.hpp.

◆ def

PropagatorGroup Gecode::PropagatorGroup::def
static

Group of propagators not in any user-defined group.

Definition at line 792 of file core.hpp.


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