1 #ifndef _IMAGES_KD_TREE_H
2 #define _IMAGES_KD_TREE_H
4 #define IMAGE_SEARCH_DIST_UNLIMITED (~0U)
6 /* FIXME: support full length of oid_t, currently must be <2^31 */
7 #define IMAGE_SEARCH_ITEM_TYPE 0x80000000U
8 struct image_search_item {
11 struct image_bbox bbox;
15 struct image_tree *tree;
16 struct image_node *nodes;
17 struct image_leaf *leaves;
18 struct image_vector query;
19 struct image_search_item *buf;
21 uns count, visited, size, max_dist;
24 void image_search_init(struct image_search *is, struct image_tree *tree, struct image_vector *query, uns max_dist);
25 void image_search_done(struct image_search *is);
26 int image_search_next(struct image_search *is, oid_t *oid, uns *dist);