Limbo
|
#include <GreedySearch.h>
Public Types | |
typedef CallbackType | callback_type |
typedef callback_type::node_type | node_type |
typedef callback_type::cost_type | cost_type |
typedef callback_type::row_type | row_type |
typedef callback_type::site_coordinate_type | site_coordinate_type |
typedef callback_type::node_vector_type | node_vector_type |
node container for a single row | |
typedef callback_type::node_fail_vector_type | node_fail_vector_type |
typedef callback_type::row_vector_type | row_vector_type |
typedef gs_choose_type < typename row_vector_type::value_type > ::value_type | row_value_type |
typedef gs_choose_type < typename row_vector_type::value_type > ::const_value_type | row_const_value_type |
typedef gs_choose_type < typename node_vector_type::value_type > ::value_type | node_value_type |
typedef gs_choose_type < typename node_vector_type::value_type > ::const_value_type | node_const_value_type |
Public Member Functions | |
GreedySearch (callback_type cbk=callback_type()) | |
void | operator() (node_fail_vector_type &vFailNode, int max_swap_cnt) |
void | run (node_fail_vector_type &vFailNode, int max_swap_cnt) |
bool | search_swap (node_value_type n, node_fail_vector_type &vFailNode, int swap_cnt) |
Protected Member Functions | |
site_coordinate_type | node_site_size_x (node_const_value_type n) const |
site_coordinate_type | node_site_gap_x (node_const_value_type n1, node_const_value_type n2) const |
site_coordinate_type | site_xl (node_const_value_type n) const |
site_coordinate_type | site_xh (node_const_value_type n) const |
Protected Attributes | |
callback_type | m_cbk |
a copiable callback_type is required | |
core class to perform greedy search functions
CallbackType | provides all the information needed |
Definition at line 139 of file GreedySearch.h.
|
inline |
|
inlineprotected |
n1 | node |
n2 | node |
Definition at line 299 of file GreedySearch.h.
|
inlineprotected |
|
inline |
API to run the algorithm
vFailNode | container to store failed nodes |
max_swap_cnt | one cell can swap with how many other cells |
Definition at line 167 of file GreedySearch.h.
|
inline |
kernel function to run the algorithm
vFailNode | container to store failed nodes |
max_swap_cnt | one cell can swap with how many other cells |
Definition at line 171 of file GreedySearch.h.
|
inline |
node_map_type can be vector<list<node_type> > row_vector_type can be vector<row_type>
n | node |
vFailNode | container to store failed nodes |
swap_cnt | number of swaps occurs |
Definition at line 200 of file GreedySearch.h.
|
inlineprotected |
|
inlineprotected |