Base-class for advisors. More...
#include <core.hpp>
Public Member Functions | |
template<class A > | |
Advisor (Space &home, Propagator &p, Council< A > &c) | |
Constructor for creation. | |
Advisor (Space &home, bool share, Advisor &a) | |
Copying constructor. | |
Protected Member Functions | |
Propagator & | propagator (void) const |
Return the advisor's propagator. | |
Memory management | |
template<class A > | |
void | dispose (Space &home, Council< A > &c) |
Dispose the advisor. | |
static void * | operator new (size_t s, Space &home) |
Allocate memory from space. | |
static void | operator delete (void *p, Space &home) |
No-op for exceptions. |
Base-class for advisors.
Advisors are typically subclassed for each propagator that wants to use advisors. The actual member function that is executed when a variable is changed, must be implemented by the advisor's propagator.
Gecode::Advisor::Advisor | ( | Space & | home, |
Propagator & | p, | ||
Council< A > & | c | ||
) | [inline] |
Propagator & Gecode::Advisor::propagator | ( | void | ) | const [inline, protected] |
Dispose the advisor.
Reimplemented in Gecode::Set::Int::ChannelBool::IndexAdvisor, and Gecode::ViewAdvisor.
void * Gecode::Advisor::operator new | ( | size_t | s, |
Space & | home | ||
) | [inline, static] |
void Gecode::Advisor::operator delete | ( | void * | p, |
Space & | home | ||
) | [inline, static] |