#include <math.h>#include <vector>#include <set>#include "mex.h"#include "time.h"
Go to the source code of this file.
Classes | |
| struct | state_t |
| class | stateComparison |
Defines | |
| #define | max(a, b) (a>=b ? a : b) |
| #define | min(a, b) (a<=b ? a : b) |
| #define | TIME_DEBUG 1 |
Functions | |
| double | getH (int x, int y) |
| void | getPreds (state_t *state, vector< state_t * > &preds, vector< double > &costs, double *map, int mapY, int mapX) |
| void | mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) |
| void | runAStar (double *map, int mapY, int mapX, double *start, double *goal, vector< double > &pathX, vector< double > &pathY) |
Variables | |
| int | startX |
| int | startY |
| vector< state_t > | states |
| double | transC [8] = {sqrt(2),1,sqrt(2),1,1,sqrt(2),1,sqrt(2)} |
| int | transX [8] = {-1,0,1,-1,1,-1,0,1} |
| int | transY [8] = {-1,-1,-1,0,0,1,1,1} |
| #define max | ( | a, | |||
| b | ) | (a>=b ? a : b) |
Definition at line 9 of file a_star.cpp.
| #define min | ( | a, | |||
| b | ) | (a<=b ? a : b) |
Definition at line 10 of file a_star.cpp.
| #define TIME_DEBUG 1 |
Definition at line 12 of file a_star.cpp.
| double getH | ( | int | x, | |
| int | y | |||
| ) |
Definition at line 48 of file a_star.cpp.
| void getPreds | ( | state_t * | state, | |
| vector< state_t * > & | preds, | |||
| vector< double > & | costs, | |||
| double * | map, | |||
| int | mapY, | |||
| int | mapX | |||
| ) |
Definition at line 52 of file a_star.cpp.
| void mexFunction | ( | int | nlhs, | |
| mxArray * | plhs[], | |||
| int | nrhs, | |||
| const mxArray * | prhs[] | |||
| ) |
Definition at line 199 of file a_star.cpp.
| void runAStar | ( | double * | map, | |
| int | mapY, | |||
| int | mapX, | |||
| double * | start, | |||
| double * | goal, | |||
| vector< double > & | pathX, | |||
| vector< double > & | pathY | |||
| ) |
Definition at line 74 of file a_star.cpp.
| int startX |
Definition at line 24 of file a_star.cpp.
| int startY |
Definition at line 25 of file a_star.cpp.
Definition at line 22 of file a_star.cpp.
| double transC[8] = {sqrt(2),1,sqrt(2),1,1,sqrt(2),1,sqrt(2)} |
Definition at line 29 of file a_star.cpp.
| int transX[8] = {-1,0,1,-1,1,-1,0,1} |
Definition at line 28 of file a_star.cpp.
| int transY[8] = {-1,-1,-1,0,0,1,1,1} |
Definition at line 27 of file a_star.cpp.