Adapts vector representing n queen problem to class able to efficiently compute gain of given move. More...
#include <n_queens_solution.hpp>
Public Types | |
| 
typedef  boost::counting_iterator< int >  | QueensIterator | 
Public Member Functions | |
| n_queens_solution_adapter (NQueensPositionsVector &pos) | |
| constructor  More... | |
| QueensIterator | begin () const | 
| begin of the queens positions' collection  More... | |
| QueensIterator | end () const | 
| end of the queens positions' collection  More... | |
| void | swap_queens (int xLeft, int xRight) | 
| swaps two queens positions  More... | |
| int | get_num_attacing (int x, int y) const | 
| get number of queens attacing (x,y) position  More... | |
| int | get_y (int x) const | 
| return y for xth queen  More... | |
| int | obj_fun () const | 
| computes total number of conflicts on the board  More... | |
Adapts vector representing n queen problem to class able to efficiently compute gain of given move.
| NQueensPositionsVector | 
Definition at line 35 of file n_queens_solution.hpp.
      
  | 
  inline | 
      
  | 
  inline | 
begin of the queens positions' collection
Definition at line 58 of file n_queens_solution.hpp.
      
  | 
  inline | 
end of the queens positions' collection
Definition at line 65 of file n_queens_solution.hpp.
      
  | 
  inline | 
get number of queens attacing (x,y) position
| x | |
| y | 
Definition at line 89 of file n_queens_solution.hpp.
      
  | 
  inline | 
      
  | 
  inline | 
computes total number of conflicts on the board
Definition at line 107 of file n_queens_solution.hpp.
      
  | 
  inline | 
swaps two queens positions
| xLeft | |
| xRight | 
Definition at line 75 of file n_queens_solution.hpp.
 1.8.5