C++ Reference: class Demon

This documentation is automatically generated.

A Demon is the base element of a propagation queue. It is the main object responsible for implementing the actual propagation of the constraint and pruning the inconsistent values in the domains of the variables. The main concept is that demons are listeners that are attached to the variables and listen to their modifications. There are two methods:
   - Run() is the actual method called when the demon is processed.
   - priority() returns its priority. Standard priorities are slow, normal or fast. "immediate" is reserved for variables and is treated separately.
Method
DebugString

Return type: std::string

Demon

This indicates the priority of a demon. Immediate demons are treated separately and corresponds to variables.

~Demon

desinhibit

Return type: void

Arguments: Solver* const s

This method un-inhibits the demon that was previously inhibited.

inhibit

Return type: void

Arguments: Solver* const s

This method inhibits the demon in the search tree below the current position.

priority

Return type: virtual Solver::DemonPriority

This method returns the priority of the demon. Usually a demon is fast, slow or normal. Immediate demons are reserved for internal use to maintain variables.

Run

Return type: virtual void

Arguments: Solver* const s

This is the main callback of the demon.