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

📄 rtsettings.h

📁 此文件包含了在linux下实现tpr-tree索引的源代码
💻 H
字号:
// -*- Mode: C++ -*-//--------------------------------------------------------------------//      rtsettings.h//      ------------//      Encapsulates all the variables controling the algorithms////      Class hierarchy://      RTsettings////      TPR-tree - Index for continuously moving objects//      July 2001 release, Aalborg University//#ifndef RTSETTINGS_H#define RTSETTINGS_H#define TPR_MAX_DIMS  3        // Maximum number of dimensions in TPR-tree//------------------------------------------------ //    RTsettings //    Set... methods are responsible to make sure that all settings are//    consistent (some combinations of settings may not make//    sence). They return bool to indicate if the setting is legal.//class RTsettings{public:         //  Necessary enum types   //   enum TreeType  {tTPRtree, tRtree, tOpttree};   enum LoadAlgorithm {aNormal, aNormalHilbert, aDual, aDualHilbert,                        aDualSpeed, aVelocity, aCSD, aCDS, aDSC, aSDC, aRatio};   enum SplitAlgorithm {saOld, saNoOverlap};   enum ChoosesubtreeAlgorithm {cstArea, cstOverlap};   enum UnionMode      {unInsCT, unInsRefT};   //  Default settings   //    RTsettings () :            dims       (2),      treetype   (tTPRtree),      loadalg    (aRatio),      splitalg   (saOld),      unionmode  (unInsCT),      choosesubtreealg (cstOverlap)      {}         //  Get... methods    //   int             GetDims         () const { return dims;        }    LoadAlgorithm   GetLoadAlg      () const { return loadalg;     }   TreeType        GetTreeType     () const { return treetype;    }   SplitAlgorithm  GetSplitAlg     () const { return splitalg;    }   UnionMode       GetUnionMode    () const { return unionmode;   }   ChoosesubtreeAlgorithm GetChoosesubtreeAlg () const { return choosesubtreealg; }   // Additional accessor methods   //      bool IsDSAlg () const       {         return loadalg == aCSD || loadalg == aCDS ||                loadalg == aDSC || loadalg == aSDC;      }   bool IsCTUnionMode () const { return unionmode != unInsRefT; }   //  Set... Methods   //   bool SetDims     (int d)      {         if (d > TPR_MAX_DIMS) return false;         dims = d;         return true;      }   bool SetTreeType (TreeType t)       {         treetype = t;         if (t == tRtree || t ==tOpttree) SetLoadAlg (aNormal);         return true;      }   bool SetLoadAlg (LoadAlgorithm a)       {         loadalg = a;          return true;      }   bool SetUnionMode (UnionMode um)       {         unionmode = um;          return true;      }   bool SetSplitAlg (SplitAlgorithm a)       {         splitalg = a;          return true;      }   bool SetChoosesubtreeAlg (ChoosesubtreeAlgorithm a)       {         choosesubtreealg = a;          return true;      }   protected:   int                    dims;         // number of spatial dimensions   LoadAlgorithm          loadalg;         TreeType               treetype;   SplitAlgorithm         splitalg;   UnionMode              unionmode;   ChoosesubtreeAlgorithm choosesubtreealg;};//------------------------------------------------ extern RTsettings Settings;#endif

⌨️ 快捷键说明

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