2D search itself More...
#include <2Dgridsearch.h>
Public Member Functions | |
void | destroy () |
destroys the search and clears all memory | |
int | getlargestcomputedoptimalf_inmm () |
returns largest optimal g-value computed by search - a lower bound on the state values of unexpanded states | |
int | getlowerboundoncostfromstart_inmm (int x, int y) |
returns the computed distance from the start to <x,y>. If not computed, then returns lower bound on it. | |
void | printvalues () |
print all the values | |
SBPL2DGridSearch (int width_x, int height_y, float cellsize_m) | |
bool | search (unsigned char **Grid2D, unsigned char obsthresh, int startx_c, int starty_c, int goalx_c, int goaly_c, SBPL_2DGRIDSEARCH_TERM_CONDITION termination_condition) |
performs search itself. All costs are given as cost(cell1, cell2) = Euclidean distance*1000*(max(cell1,cell2)+1) for adjacent cells. | |
bool | setOPENdatastructure (SBPL_2DGRIDSEARCH_OPENTYPE OPENtype) |
the priority data structure used - it affects efficiency (can be either heap or sliding buckets, see definition of SBPL_2DGRIDSEARCH_OPENTYPE) | |
~SBPL2DGridSearch () | |
Private Member Functions | |
void | computedxy () |
bool | createSearchStates2D (void) |
void | initializeSearchState2D (SBPL_2DGridSearchState *state2D) |
bool | search_exp (unsigned char **Grid2D, unsigned char obsthresh, int startx_c, int starty_c, int goalx_c, int goaly_c) |
bool | search_withbuckets (unsigned char **Grid2D, unsigned char obsthresh, int startx_c, int starty_c, int goalx_c, int goaly_c) |
bool | search_withheap (unsigned char **Grid2D, unsigned char obsthresh, int startx_c, int starty_c, int goalx_c, int goaly_c, SBPL_2DGRIDSEARCH_TERM_CONDITION termination_condition) |
bool | search_withslidingbuckets (unsigned char **Grid2D, unsigned char obsthresh, int startx_c, int starty_c, int goalx_c, int goaly_c, SBPL_2DGRIDSEARCH_TERM_CONDITION termination_condition) |
bool | withinMap (int x, int y) |
Private Attributes | |
float | cellSize_m_ |
int | dx0intersects_ [SBPL_2DGRIDSEARCH_NUMOF2DDIRS] |
int | dx1intersects_ [SBPL_2DGRIDSEARCH_NUMOF2DDIRS] |
int | dx_ [SBPL_2DGRIDSEARCH_NUMOF2DDIRS] |
int | dxy_distance_mm_ [SBPL_2DGRIDSEARCH_NUMOF2DDIRS] |
int | dy0intersects_ [SBPL_2DGRIDSEARCH_NUMOF2DDIRS] |
int | dy1intersects_ [SBPL_2DGRIDSEARCH_NUMOF2DDIRS] |
int | dy_ [SBPL_2DGRIDSEARCH_NUMOF2DDIRS] |
int | goalX_ |
int | goalY_ |
int | height_ |
int | iteration_ |
int | largestcomputedoptf_ |
CIntHeap * | OPEN2D_ |
CSlidingBucket * | OPEN2DBLIST_ |
SBPL_2DGRIDSEARCH_OPENTYPE | OPENtype_ |
SBPL_2DGridSearchState ** | searchStates2D_ |
int | startX_ |
int | startY_ |
SBPL_2DGRIDSEARCH_TERM_CONDITION | term_condition_usedlast |
int | width_ |
2D search itself
Definition at line 74 of file 2Dgridsearch.h.
SBPL2DGridSearch::SBPL2DGridSearch | ( | int | width_x, | |
int | height_y, | |||
float | cellsize_m | |||
) |
Definition at line 38 of file 2Dgridsearch.cpp.
SBPL2DGridSearch::~SBPL2DGridSearch | ( | ) | [inline] |
Definition at line 79 of file 2Dgridsearch.h.
void SBPL2DGridSearch::computedxy | ( | ) | [private] |
Definition at line 176 of file 2Dgridsearch.cpp.
bool SBPL2DGridSearch::createSearchStates2D | ( | void | ) | [private] |
Definition at line 116 of file 2Dgridsearch.cpp.
void SBPL2DGridSearch::destroy | ( | ) |
destroys the search and clears all memory
Definition at line 148 of file 2Dgridsearch.cpp.
int SBPL2DGridSearch::getlargestcomputedoptimalf_inmm | ( | ) | [inline] |
returns largest optimal g-value computed by search - a lower bound on the state values of unexpanded states
Definition at line 125 of file 2Dgridsearch.h.
int SBPL2DGridSearch::getlowerboundoncostfromstart_inmm | ( | int | x, | |
int | y | |||
) | [inline] |
returns the computed distance from the start to <x,y>. If not computed, then returns lower bound on it.
Definition at line 103 of file 2Dgridsearch.h.
void SBPL2DGridSearch::initializeSearchState2D | ( | SBPL_2DGridSearchState * | state2D | ) | [inline, private] |
Definition at line 140 of file 2Dgridsearch.cpp.
void SBPL2DGridSearch::printvalues | ( | ) |
print all the values
Definition at line 221 of file 2Dgridsearch.cpp.
bool SBPL2DGridSearch::search | ( | unsigned char ** | Grid2D, | |
unsigned char | obsthresh, | |||
int | startx_c, | |||
int | starty_c, | |||
int | goalx_c, | |||
int | goaly_c, | |||
SBPL_2DGRIDSEARCH_TERM_CONDITION | termination_condition | |||
) |
performs search itself. All costs are given as cost(cell1, cell2) = Euclidean distance*1000*(max(cell1,cell2)+1) for adjacent cells.
Definition at line 231 of file 2Dgridsearch.cpp.
bool SBPL2DGridSearch::search_exp | ( | unsigned char ** | Grid2D, | |
unsigned char | obsthresh, | |||
int | startx_c, | |||
int | starty_c, | |||
int | goalx_c, | |||
int | goaly_c | |||
) | [private] |
Definition at line 411 of file 2Dgridsearch.cpp.
bool SBPL2DGridSearch::search_withbuckets | ( | unsigned char ** | Grid2D, | |
unsigned char | obsthresh, | |||
int | startx_c, | |||
int | starty_c, | |||
int | goalx_c, | |||
int | goaly_c | |||
) | [private] |
Definition at line 525 of file 2Dgridsearch.cpp.
bool SBPL2DGridSearch::search_withheap | ( | unsigned char ** | Grid2D, | |
unsigned char | obsthresh, | |||
int | startx_c, | |||
int | starty_c, | |||
int | goalx_c, | |||
int | goaly_c, | |||
SBPL_2DGRIDSEARCH_TERM_CONDITION | termination_condition | |||
) | [private] |
Definition at line 253 of file 2Dgridsearch.cpp.
bool SBPL2DGridSearch::search_withslidingbuckets | ( | unsigned char ** | Grid2D, | |
unsigned char | obsthresh, | |||
int | startx_c, | |||
int | starty_c, | |||
int | goalx_c, | |||
int | goaly_c, | |||
SBPL_2DGRIDSEARCH_TERM_CONDITION | termination_condition | |||
) | [private] |
Definition at line 650 of file 2Dgridsearch.cpp.
bool SBPL2DGridSearch::setOPENdatastructure | ( | SBPL_2DGRIDSEARCH_OPENTYPE | OPENtype | ) |
the priority data structure used - it affects efficiency (can be either heap or sliding buckets, see definition of SBPL_2DGRIDSEARCH_OPENTYPE)
Definition at line 73 of file 2Dgridsearch.cpp.
bool SBPL2DGridSearch::withinMap | ( | int | x, | |
int | y | |||
) | [inline, private] |
Definition at line 130 of file 2Dgridsearch.h.
float SBPL2DGridSearch::cellSize_m_ [private] |
Definition at line 167 of file 2Dgridsearch.h.
int SBPL2DGridSearch::dx0intersects_[SBPL_2DGRIDSEARCH_NUMOF2DDIRS] [private] |
Definition at line 151 of file 2Dgridsearch.h.
int SBPL2DGridSearch::dx1intersects_[SBPL_2DGRIDSEARCH_NUMOF2DDIRS] [private] |
Definition at line 152 of file 2Dgridsearch.h.
int SBPL2DGridSearch::dx_[SBPL_2DGRIDSEARCH_NUMOF2DDIRS] [private] |
Definition at line 147 of file 2Dgridsearch.h.
int SBPL2DGridSearch::dxy_distance_mm_[SBPL_2DGRIDSEARCH_NUMOF2DDIRS] [private] |
Definition at line 156 of file 2Dgridsearch.h.
int SBPL2DGridSearch::dy0intersects_[SBPL_2DGRIDSEARCH_NUMOF2DDIRS] [private] |
Definition at line 153 of file 2Dgridsearch.h.
int SBPL2DGridSearch::dy1intersects_[SBPL_2DGRIDSEARCH_NUMOF2DDIRS] [private] |
Definition at line 154 of file 2Dgridsearch.h.
int SBPL2DGridSearch::dy_[SBPL_2DGRIDSEARCH_NUMOF2DDIRS] [private] |
Definition at line 148 of file 2Dgridsearch.h.
int SBPL2DGridSearch::goalX_ [private] |
Definition at line 163 of file 2Dgridsearch.h.
int SBPL2DGridSearch::goalY_ [private] |
Definition at line 163 of file 2Dgridsearch.h.
int SBPL2DGridSearch::height_ [private] |
Definition at line 166 of file 2Dgridsearch.h.
int SBPL2DGridSearch::iteration_ [private] |
Definition at line 170 of file 2Dgridsearch.h.
int SBPL2DGridSearch::largestcomputedoptf_ [private] |
Definition at line 173 of file 2Dgridsearch.h.
CIntHeap* SBPL2DGridSearch::OPEN2D_ [private] |
Definition at line 145 of file 2Dgridsearch.h.
CSlidingBucket* SBPL2DGridSearch::OPEN2DBLIST_ [private] |
Definition at line 144 of file 2Dgridsearch.h.
Definition at line 159 of file 2Dgridsearch.h.
Definition at line 146 of file 2Dgridsearch.h.
int SBPL2DGridSearch::startX_ [private] |
Definition at line 162 of file 2Dgridsearch.h.
int SBPL2DGridSearch::startY_ [private] |
Definition at line 162 of file 2Dgridsearch.h.
Definition at line 176 of file 2Dgridsearch.h.
int SBPL2DGridSearch::width_ [private] |
Definition at line 166 of file 2Dgridsearch.h.