Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set | ||
|
||
Public Member Functions | |
DobbleFilter (const IntVar *const *card_symbol_vars, int num_vars, int num_cards, int num_symbols, int num_symbols_per_card) | |
virtual void | OnSynchronize () |
We build the current bitmap and the matrix of violation cost between any two cards. | |
virtual bool | Accept (const Assignment *delta, const Assignment *unused_deltadelta) |
The LocalSearchFilter::Accept() API also takes a deltadelta, which is the difference between the current delta and the last delta that was given to Accept() -- but we don't use it here. | |
Classes | |
struct | UndoChange |
Undo information after an evaluation. |
A filter is responsible for rejecting a local search move faster than what the propagation of the constraint solver would do. Its API consists in:
To decide if a move is valid, first this DobbleFilter builds a bitmap of symbols per card. Then for each move, it updates the bitmap according to the move and checks the following constraints:
Please note that this filter uses a fixed size bitset and effectively limits the number of cards to 63, and thus the number of symbols per card to 8.
Definition at line 455 of file dobble_ls.cc.
operations_research::DobbleFilter::DobbleFilter | ( | const IntVar *const * | card_symbol_vars, | |
int | num_vars, | |||
int | num_cards, | |||
int | num_symbols, | |||
int | num_symbols_per_card | |||
) | [inline] |
Definition at line 457 of file dobble_ls.cc.
virtual void operations_research::DobbleFilter::OnSynchronize | ( | ) | [inline, virtual] |
We build the current bitmap and the matrix of violation cost between any two cards.
Definition at line 472 of file dobble_ls.cc.
virtual bool operations_research::DobbleFilter::Accept | ( | const Assignment * | delta, | |
const Assignment * | unused_deltadelta | |||
) | [inline, virtual] |
The LocalSearchFilter::Accept() API also takes a deltadelta, which is the difference between the current delta and the last delta that was given to Accept() -- but we don't use it here.
Definition at line 494 of file dobble_ls.cc.