whitespace fixes
git-svn-id: http://kdtree.googlecode.com/svn/trunk@31 58b2c0e6-ac2f-0410-a5b6-b51bcff41737
This commit is contained in:
parent
176ca28697
commit
cb79847cd3
2 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@
|
||||||
unsigned int get_msec(void)
|
unsigned int get_msec(void)
|
||||||
{
|
{
|
||||||
static struct timeval timeval, first_timeval;
|
static struct timeval timeval, first_timeval;
|
||||||
|
|
||||||
gettimeofday(&timeval, 0);
|
gettimeofday(&timeval, 0);
|
||||||
|
|
||||||
if(first_timeval.tv_sec == 0) {
|
if(first_timeval.tv_sec == 0) {
|
||||||
|
@ -26,7 +26,7 @@ int main(int argc, char **argv)
|
||||||
int i, vcount = 10;
|
int i, vcount = 10;
|
||||||
void *kd, *set;
|
void *kd, *set;
|
||||||
unsigned int msec, start;
|
unsigned int msec, start;
|
||||||
|
|
||||||
if(argc > 1 && isdigit(argv[1][0])) {
|
if(argc > 1 && isdigit(argv[1][0])) {
|
||||||
vcount = atoi(argv[1]);
|
vcount = atoi(argv[1]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,10 +35,10 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
srand( time(0) );
|
srand( time(0) );
|
||||||
|
|
||||||
/* create a k-d tree for 3-dimensional points */
|
/* create a k-d tree for 3-dimensional points */
|
||||||
ptree = kd_create( 3 );
|
ptree = kd_create( 3 );
|
||||||
|
|
||||||
/* add some random nodes to the tree (assert nodes are successfully inserted) */
|
/* add some random nodes to the tree (assert nodes are successfully inserted) */
|
||||||
for( i=0; i<num_pts; i++ ) {
|
for( i=0; i<num_pts; i++ ) {
|
||||||
data[i] = 'a' + i;
|
data[i] = 'a' + i;
|
||||||
|
@ -54,7 +54,7 @@ int main(int argc, char **argv) {
|
||||||
while( !kd_res_end( presults ) ) {
|
while( !kd_res_end( presults ) ) {
|
||||||
/* get the data and position of the current result item */
|
/* get the data and position of the current result item */
|
||||||
pch = (char*)kd_res_item( presults, pos );
|
pch = (char*)kd_res_item( presults, pos );
|
||||||
|
|
||||||
/* compute the distance of the current result from the pt */
|
/* compute the distance of the current result from the pt */
|
||||||
dist = sqrt( dist_sq( pt, pos, 3 ) );
|
dist = sqrt( dist_sq( pt, pos, 3 ) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue