GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
qtree.h
Go to the documentation of this file.
1 
2 /*-
3  * Written by H. Mitasova, I. Kosinovsky, D. Gerdes Fall 1993
4  * University of Illinois
5  * US Army Construction Engineering Research Lab
6  * Copyright 1993, H. Mitasova (University of Illinois),
7  * I. Kosinovsky, (USA-CERL), and D.Gerdes (USA-CERL)
8  *
9  * updated by Mitasova Nov. 96, no changes necessary
10  */
11 
12 
13 #ifndef TREE_H
14 
15 #define TREE_H
16 
17 #define VOID_T char
18 
19 
20 struct multfunc
21 {
22  int (*compare) ();
23  struct quaddata **(*divide_data) ();
24  int (*add_data) ();
25  int (*intersect) ();
26  int (*division_check) ();
27  int (*get_points) ();
28 };
29 
30 struct tree_info
31 {
33  double dmin;
34  int kmax;
35  struct multtree *root;
36 };
37 
38 struct multtree
39 {
40  struct quaddata *data;
41  struct multtree **leafs;
42  struct multtree *parent;
43  int multant;
44 };
45 
46 struct multfunc *MT_functions_new(int (*)(struct triple *, struct quaddata *),
47  struct quaddata **(*)(struct quaddata *,
48  int, double),
49  int (*)(struct triple *, struct quaddata *,
50  double), int (*)(struct quaddata *,
51  struct quaddata *),
52  int (*)(struct quaddata *, int),
53  int (*)(struct quaddata *,
54  struct quaddata *, int));
55 struct tree_info *MT_tree_info_new(struct multtree *, struct multfunc *,
56  double, int);
57 struct multtree *MT_tree_new(struct quaddata *, struct multtree **,
58  struct multtree *, int);
59 int MT_insert(struct triple *, struct tree_info *, struct multtree *, int);
60 int MT_divide(struct tree_info *, struct multtree *, int);
61 int MT_region_data(struct tree_info *, struct multtree *, struct quaddata *,
62  int, int);
63 
64 #endif