Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ examples/ cpp/

operations_research::DobbleFilter Class Reference

Local Search Filter. More...

Inheritance diagram for operations_research::DobbleFilter:

IntVarLocalSearchFilter

List of all members.

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.


Detailed Description

Local Search Filter.

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


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