SBPL2DGridSearch Class Reference

2D search itself More...

#include <2Dgridsearch.h>

List of all members.

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_
CIntHeapOPEN2D_
CSlidingBucketOPEN2DBLIST_
SBPL_2DGRIDSEARCH_OPENTYPE OPENtype_
SBPL_2DGridSearchState ** searchStates2D_
int startX_
int startY_
SBPL_2DGRIDSEARCH_TERM_CONDITION term_condition_usedlast
int width_

Detailed Description

2D search itself

Definition at line 74 of file 2Dgridsearch.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Note:
It is infinite if max(cell1,cell2) >= obsthresh For cells that are not adjacent (which may happen if 16 connected grid is ON), then max is taken over all the cells center line goes through Search is done from start to goal. termination_condition specifies when to stop the search. In particular, one may specify to run it until OPEN is empty. In this case, the values of all states will be computed.

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.


Member Data Documentation

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.

Definition at line 166 of file 2Dgridsearch.h.

Definition at line 170 of file 2Dgridsearch.h.

Definition at line 173 of file 2Dgridsearch.h.

Definition at line 145 of file 2Dgridsearch.h.

Definition at line 144 of file 2Dgridsearch.h.

Definition at line 159 of file 2Dgridsearch.h.

Definition at line 146 of file 2Dgridsearch.h.

Definition at line 162 of file 2Dgridsearch.h.

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.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines


sbpl
Author(s): Maxim Likhachev/maximl@seas.upenn.edu
autogenerated on Fri Jan 11 09:38:51 2013