Main Page | Data Structures | Directories | File List | Globals

mqkdtree2f.h

Go to the documentation of this file.
00001 #ifndef _KD_TREE_2F_H_
00002 #define _KD_TREE_2F_H_
00003 
00004 /* Copyright (c) Kyriacos Leptos and the President and Fellows of Harvard University
00005    Release Date: 2004-11-01
00006    Part of the MapQuant suite library "mqbasic.lib" 
00007 */
00008 
00022 struct KdItem2f
00023 {
00024     float x[2];
00025     void* pointer;
00026 };
00027 
00028 typedef struct KdItem2f KdItem2f;
00029 
00034 struct KdNode2f
00035 {
00036     struct KdItem2f   data;
00037     struct KdNode2f*    left;
00038     struct KdNode2f*    right;
00039 };
00040 
00041 typedef struct KdNode2f KdNode2f;
00042 
00047 typedef struct KdNode2f* KdTree2f;
00048 
00049 extern void (*KdTree2f_setElement) (const void* array, int index, const void* data);
00050 
00051 static KdTree2f KdTree2f_recursiveInsert(KdTree2f T,  KdItem2f* item, int level);
00052 KdTree2f        KdTree2f_insert         (KdTree2f T,  KdItem2f* item);
00053 
00054 void KdTree2f_getArrayInRange(KdTree2f T, void* array_to_be_filled, int max_size, 
00055                                      int* size_of_array, KdItem2f* low, KdItem2f* high);
00056 
00057 void KdTree2f_countElementsInRange(KdTree2f T, int* size_of_array, 
00058                                    KdItem2f* low, KdItem2f* high);
00059 #endif
00060 

Generated on Tue Feb 7 03:25:43 2006 for libmqbasic by  doxygen 1.4.4