C++ Reference
C++ Reference: Routing
Detailed Description
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.
Definition at line 3301 of file constraint_solver.h.
Public Member Functions | |
Demon () | |
This indicates the priority of a demon. More... | |
~Demon () override | |
virtual void | Run (Solver *const s)=0 |
This is the main callback of the demon. More... | |
virtual Solver::DemonPriority | priority () const |
This method returns the priority of the demon. More... | |
std::string | DebugString () const override |
void | inhibit (Solver *const s) |
This method inhibits the demon in the search tree below the current position. More... | |
void | desinhibit (Solver *const s) |
This method un-inhibits the demon that was previously inhibited. More... | |
Constructor & Destructor Documentation
◆ Demon()
|
inline |
This indicates the priority of a demon.
Immediate demons are treated separately and corresponds to variables.
Definition at line 3305 of file constraint_solver.h.
◆ ~Demon()
|
inlineoverride |
Definition at line 3306 of file constraint_solver.h.
Member Function Documentation
◆ DebugString()
|
overridevirtual |
Reimplemented from BaseObject.
Reimplemented in DelayedCallMethod2< T, P, Q >, DelayedCallMethod1< T, P >, DelayedCallMethod0< T >, CallMethod3< T, P, Q, R >, CallMethod2< T, P, Q >, CallMethod1< T, P >, and CallMethod0< T >.
◆ desinhibit()
void desinhibit | ( | Solver *const | s | ) |
This method un-inhibits the demon that was previously inhibited.
◆ inhibit()
void inhibit | ( | Solver *const | s | ) |
This method inhibits the demon in the search tree below the current position.
◆ priority()
|
virtual |
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.
Reimplemented in DelayedCallMethod2< T, P, Q >, DelayedCallMethod1< T, P >, and DelayedCallMethod0< T >.
◆ Run()
|
pure virtual |
This is the main callback of the demon.
Implemented in DelayedCallMethod2< T, P, Q >, DelayedCallMethod1< T, P >, DelayedCallMethod0< T >, CallMethod3< T, P, Q, R >, CallMethod2< T, P, Q >, CallMethod1< T, P >, and CallMethod0< T >.
The documentation for this class was generated from the following file: