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

operations_research::SwapSymbolsOnCardPairs Class Reference

Multiple swaps of two symbols. More...

Inheritance diagram for operations_research::SwapSymbolsOnCardPairs:

operations_research::DobbleOperator IntVarLocalSearchOperator

List of all members.

Public Member Functions

 SwapSymbolsOnCardPairs (const IntVar *const *card_symbol_vars, int num_vars, int num_cards, int num_symbols, int num_symbols_per_card, int max_num_swaps)
virtual ~SwapSymbolsOnCardPairs ()

Protected Member Functions

virtual bool MakeOneNeighbor ()
virtual void InitNeighborhoodSearch ()


Detailed Description

Multiple swaps of two symbols.

This operator is an expanded version of the previous operator.

At each step, it will pick a number num_swaps at random in [2 .. max_num_swaps], and then pick num_swaps random pairs (card1, some symbol on card1), (card2, some symbol on card2), and swap the symbols of each pair.

As the search space (the "neighborhood") is huge, we use a randomized "infinite" version instead of an iterative, exhaustive one.

Definition at line 386 of file dobble_ls.cc.


Constructor & Destructor Documentation

operations_research::SwapSymbolsOnCardPairs::SwapSymbolsOnCardPairs ( const IntVar *const *  card_symbol_vars,
int  num_vars,
int  num_cards,
int  num_symbols,
int  num_symbols_per_card,
int  max_num_swaps 
) [inline]

Definition at line 388 of file dobble_ls.cc.

virtual operations_research::SwapSymbolsOnCardPairs::~SwapSymbolsOnCardPairs (  )  [inline, virtual]

Definition at line 404 of file dobble_ls.cc.


Member Function Documentation

virtual bool operations_research::SwapSymbolsOnCardPairs::MakeOneNeighbor (  )  [inline, protected, virtual]

Definition at line 407 of file dobble_ls.cc.

virtual void operations_research::SwapSymbolsOnCardPairs::InitNeighborhoodSearch (  )  [inline, protected, virtual]

Implements operations_research::DobbleOperator.

Definition at line 421 of file dobble_ls.cc.


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