27 int maxIterations = 10*
numBuckets*pathsPerBucket;
29 if ((mapSizeX != -1) && (mapSizeY != -1))
30 map->
Scale(mapSizeX, mapSizeY);
37 Graph *g = absMap->GetAbstractGraph(0);
42 printf(
"# bucket\tmap\tsizex\tsizey\tfromx\tfromy\ttox\ttoy\tA*len\n");
46 while ((pathsLeft > 0) && (iterations < maxIterations))
53 }
while (!absMap->
Pathable(r1, r2) || (r1 == r2) ||
54 ((iterations > maxIterations/2) && (absMap->h(r1, r2) >
numBuckets*bucketSize)));
70 length += sqrt(t1*t1+t2*t2);
75 ((iterations > maxIterations/2) && (buckets[(
int)length/bucketSize] == pathsPerBucket)))
82 length -= sqrt(t1*t1+t2*t2);
85 t->
next = 0;
delete t;
93 if (buckets[(
int)length/
numBuckets] < pathsPerBucket)
115 length += sqrt(t1*t1+t2*t2);
123 if ((length/bucketSize <
numBuckets) && (buckets[(
int)length/bucketSize] < pathsPerBucket))
125 buckets[(int)length/bucketSize]++;
135 printf(
"%d\t%s\t%d\t%d\t%d\t%d\t%d\t%d\t%1.2f\n",
136 (
int)(length/bucketSize), _map, mapSizeX, mapSizeY, x1, y1, x2, y2, length);