ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Tree-M/PMT.h
(Generate patch)

Comparing Tree-M/PMT.h (file contents):
Revision 1.1 by root, Sun May 6 00:45:51 2001 UTC vs.
Revision 1.3 by root, Wed May 23 02:11:14 2001 UTC

1#ifndef PMT_H 1#ifndef PMT_H
2#define PMT_H 2#define PMT_H
3 3
4#include <GiSTlist.h> 4#include <GiSTlist.h>
5
6typedef unsigned long velem;
5 7
6class MT; 8class MT;
7 9
8class PMT { 10class PMT {
9 MT *mt; 11 MT *mt;
14 double max; 16 double max;
15 double steps; 17 double steps;
16 18
17 double maxDist; 19 double maxDist;
18 int elemsize; 20 int elemsize;
21 velem vzero;
22
23 int distfast; // can distance be computed fast (integer arithmetic)
24 double distmul; // then use this corrective factor
19 25
20public: 26public:
21 PMT(int ndims, double min, double max, double steps); 27 PMT(int ndims,
28 double min,
29 double max,
30 double steps,
31 unsigned int pagesize);
22 ~PMT(); 32 ~PMT();
33 void sync();
23 void create(const char *path); 34 void create(const char *path);
24 void open(const char *path); 35 void open(const char *path);
25 void insert(double *k, int data); 36 void insert(double *k, int data);
26 double distance(double *k1, double *k2) const; 37 double distance(double *k1, double *k2) const;
27 void range(double *k, double r) const; 38 void range(double *k, double r) const;
28 void top(double *k, int n) const; 39 void top(double *k, int n) const;
40 int maxlevel() const;
29 //bulkload(PKey *o, int count); 41 //bulkload(PKey *o, int count);
30}; 42};
31 43
32#define ACC (current_pmt) 44#define ACC (current_pmt)
33#define NDIMS (ACC->ndims) 45#define NDIMS (ACC->ndims)
34 46
35extern const PMT *current_pmt; 47extern const PMT *current_pmt;
36 48
37extern void add_result(double distance, int data, double *k, int ndims); 49extern void add_result(int data, double *k, int ndims);
38 50
39#endif 51#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines