41 #define PRIORITYBUFSIZE 10000 51 #define push_cur(n) { if (n>=0 && n<ns_ && !pending_[n] && getCost(costs, n)<lethal_cost_ && currentEnd_<PRIORITYBUFSIZE){ currentBuffer_[currentEnd_++]=n; pending_[n]=true; }} 52 #define push_next(n) { if (n>=0 && n<ns_ && !pending_[n] && getCost(costs, n)<lethal_cost_ && nextEnd_<PRIORITYBUFSIZE){ nextBuffer_[ nextEnd_++]=n; pending_[n]=true; }} 53 #define push_over(n) { if (n>=0 && n<ns_ && !pending_[n] && getCost(costs, n)<lethal_cost_ && overEnd_<PRIORITYBUFSIZE){ overBuffer_[ overEnd_++]=n; pending_[n]=true; }} 60 bool calculatePotentials(
unsigned char* costs,
double start_x,
double start_y,
double end_x,
double end_y,
int cycles,
84 void updateCell(
unsigned char* costs,
float* potential,
int n);
86 float getCost(
unsigned char* costs,
int n) {
DijkstraExpansion(PotentialCalculator *p_calc, int nx, int ny)
void setSize(int nx, int ny)
Sets or resets the size of the map.
unsigned char lethal_cost_
void updateCell(unsigned char *costs, float *potential, int n)
Updates the cell at index n.
float getCost(unsigned char *costs, int n)
unsigned char neutral_cost_
void setPreciseStart(bool precise)
bool calculatePotentials(unsigned char *costs, double start_x, double start_y, double end_x, double end_y, int cycles, float *potential)
void setNeutralCost(unsigned char neutral_cost)