GRASS GIS 7 Programmer's Manual  7.0.3(2016)-r00000
qtree.h
Go to the documentation of this file.
1 
25 #ifndef TREE_H
26 
27 #define TREE_H
28 
29 #define VOID_T char
30 
31 
38 struct multfunc
39 {
40  int (*compare) ();
41  struct quaddata **(*divide_data) ();
42  int (*add_data) ();
43  int (*intersect) ();
44  int (*division_check) ();
45  int (*get_points) ();
46 };
47 
48 struct tree_info
49 {
51  double dmin;
52  int kmax;
53  struct multtree *root;
54 };
55 
56 struct multtree
57 {
58  struct quaddata *data;
59  struct multtree **leafs;
60  struct multtree *parent;
61  int multant;
62 };
63 
64 struct multfunc *MT_functions_new(int (*)(struct triple *, struct quaddata *),
65  struct quaddata **(*)(struct quaddata *,
66  int, double),
67  int (*)(struct triple *, struct quaddata *,
68  double), int (*)(struct quaddata *,
69  struct quaddata *),
70  int (*)(struct quaddata *, int),
71  int (*)(struct quaddata *,
72  struct quaddata *, int));
73 struct tree_info *MT_tree_info_new(struct multtree *, struct multfunc *,
74  double, int);
75 struct multtree *MT_tree_new(struct quaddata *, struct multtree **,
76  struct multtree *, int);
77 int MT_insert(struct triple *, struct tree_info *, struct multtree *, int);
78 int MT_divide(struct tree_info *, struct multtree *, int);
79 int MT_region_data(struct tree_info *, struct multtree *, struct quaddata *,
80  int, int);
81 
82 #endif
int(* intersect)()
Definition: qtree.h:43
int(* compare)()
Definition: qtree.h:40
int(* division_check)()
Definition: qtree.h:44
struct multfunc * MT_functions_new(int(*)(struct triple *, struct quaddata *), struct quaddata **(*)(struct quaddata *, int, double), int(*)(struct triple *, struct quaddata *, double), int(*)(struct quaddata *, struct quaddata *), int(*)(struct quaddata *, int), int(*)(struct quaddata *, struct quaddata *, int))
struct quaddata * data
Definition: qtree.h:58
double dmin
Definition: qtree.h:51
int MT_insert(struct triple *, struct tree_info *, struct multtree *, int)
Definition: qtree.c:105
int MT_divide(struct tree_info *, struct multtree *, int)
Definition: qtree.c:158
struct multfunc * functions
Definition: qtree.h:50
Definition: qtree.h:38
int(* get_points)()
Definition: qtree.h:45
int kmax
Definition: qtree.h:52
struct multtree * MT_tree_new(struct quaddata *, struct multtree **, struct multtree *, int)
Definition: qtree.c:73
Definition: qtree.h:56
struct multtree * parent
Definition: qtree.h:60
struct tree_info * MT_tree_info_new(struct multtree *, struct multfunc *, double, int)
Definition: qtree.c:57
struct multtree * root
Definition: qtree.h:53
int MT_region_data(struct tree_info *, struct multtree *, struct quaddata *, int, int)
Definition: qtree.c:194
struct multtree ** leafs
Definition: qtree.h:59
int multant
Definition: qtree.h:61
int(* add_data)()
Definition: qtree.h:42