⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtbulksort.h

📁 此文件包含了在linux下实现tpr-tree索引的源代码
💻 H
字号:
// -*- Mode: C++ -*-//--------------------------------------------------------------------//      RTbulksort.h//      ------------//      Declares the interface of the array that can be sorted //      as required by STR bulk loading algorithms ////      Declared class://      RTsortArray////      TPR-tree - Index for continuously moving objects//      July 2001 release, Aalborg University//#ifndef RTBULKSORT_H#define RTBULKSORT_H#include <fstream.h>//------------------------------------------------//  Comparison functions - controls how data in //  the array is interpreted  //extern "C" int ComparePid           (const void *i, const void *j);extern "C" int CompareCoord         (const void *i, const void *j);extern "C" int CompareCoordParam    (const void *i, const void *j);extern "C" int CompareHilbert       (const void *i, const void *j);extern RTperiod RTparam;   // Time parameter accessible to Compare* functions extern int      RToffset;  // Offset added to the beginning of coords in Compare*                            // functions. Used to enable sorting of rectangles                            // augmented with their center points   //------------------------------------------------//    RTsortArray//class RTsortArray{public:   RTsortArray() : data(NULL), len(0), num(0) {}   RTsortArray(int ln, int rc_size);   ~RTsortArray();    int   GetNum () const { return  num; }   void* operator[]   (int n) const;   void* NewRec       ();   // Give address of a new record at the end   void  Sort         (int (*cmpf)(const void *, const void *));   void  HilbertSort  ();   void  SortNTimes   (int from, int numRecs, int maxRecs, double alpha,                       int (*cmpf)(const void *, const void *));   //void  OrderData    (char* dataptr, int numRecs, int maxRecs, RTcoord* uexts, int j,     //                  int (*cmpf)(const void *, const void *));   void  ReadPoints   (ifstream& is);     // reads points from the binary stream   void  AdjustPoints (RTperiod deltaT);      private:   int    rec_size;   int    len;   int    num;   char*  data; };#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -