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

📄 rtvisualizer.h

📁 此文件包含了在linux下实现tpr-tree索引的源代码
💻 H
字号:
// -*- Mode: C++ -*-//--------------------------------------------------------------------//      RTvisualizer.h //      -------------- //      Implements the functionality to visualize an entry, a node or//      a group of nodes in (space-dimension, time) dimensions.//      Produces xfig files.//      Uses the libxfig library by Kazuo Amano.////      Class hierarchy://      RTvisualizer////      TPR-tree - Index for continuously moving objects//      July 2001 release, Aalborg University//#ifndef RTVISUALIZER_H#define RTVISUALIZER_H#include "rt.h"#include <stdio.h>#include <vector>using namespace std;//------------------------------------------------//  RTvisualizer////  Usage: //   - call OpenFig to start an xfig file//   - call Measure for a number of objects (for as few as possible, as//     all of them are saved in main memory until the first call to//     Visualize functions)//   - call Visualize for the same objects and possibly additional//     objects that are enclosed in these objects////  VisualizeNode performs all these three steps for a single node//  and its bounding rectangle (computed on the spot).//  class RTvisualizer{public:   RTvisualizer() : figFile(NULL), colorMode (false) {}   ~RTvisualizer();   // Both OpenFig and VisualizeOneNode return false if fail.  h is   // used only if all objects are infinite in time, it specifies the   // extent of the picture in time, otherwise the extent is (max   // expiration time - CT)   //    bool OpenFig(const char* figName, RTperiod h = 0);       bool VisualizeNode(const char* figName, const RTnode& node, RTperiod h = 0);   void Measure   (const RTnode&  node);   void Measure  (const RTentry& entry);   void Visualize (const RTnode&  node,  int color = -1);   void Visualize (const RTentry& entry, int color = -1);   void Colorful (bool on = false) { colorMode = on; } protected:   static const int    maxColors = 7;      static       double colors[];   static const double lWidth    = 0.05;   static const double lStyleInf = 0.8;   // dotted line    static const double lStyleExp = 1.0;   // solid line    void SetLevelStyle     (int level);   void VisualizeEntry    (const RTentry& entry);   void DoMeasurement     ();   void ResetToBeMeasured ();   vector<RTkey*> toBeMeasured;      double         scaleT;   double         scaleY;   double         minY[TPR_MAX_DIMS];   FILE*          figFile;   RTperiod       horizon;   bool           colorMode;};#endif   // RTVISUALIZER_H

⌨️ 快捷键说明

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