Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
change MAXFLOAT -> FLT_MAX
  • Loading branch information
Soeren Sonnenburg committed Apr 19, 2012
1 parent 000a882 commit 2132e4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shogun/lib/JLCoverTree.h
Expand Up @@ -274,7 +274,7 @@ node<P> batch_create(v_array<P> points)

for (int i = 1; i < points.index; i++) {
ds_node<P> temp;
push(temp.dist, distance(points[0], points[i], MAXFLOAT));
push(temp.dist, distance(points[0], points[i], FLT_MAX));
temp.p = points[i];
push(point_set,temp);
}
Expand Down Expand Up @@ -761,9 +761,9 @@ void batch_nearest_neighbor(const node<P> &top_node, const node<P> &query,
v_array<d_node<P> > zero_set = pop(spare_zero_sets);

float* upper_bound = alloc_upper();
setter(upper_bound,MAXFLOAT);
setter(upper_bound,FLT_MAX);

float top_dist = distance(query.p, top_node.p, MAXFLOAT);
float top_dist = distance(query.p, top_node.p, FLT_MAX);
update(upper_bound, top_dist);

d_node<P> temp = {top_dist, &top_node};
Expand Down

0 comments on commit 2132e4e

Please sign in to comment.