GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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) ();
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
int(* intersect)()
Definition: qtree.h:25
struct tree_info * MT_tree_info_new(struct multtree *root, struct multfunc *functions, double dmin, int kmax)
Definition: qtree.c:44
int(* get_points)()
Definition: qtree.h:27
int(* compare)()
Definition: qtree.h:22
struct quaddata * data
Definition: qtree.h:40
double dmin
Definition: qtree.h:33
struct multfunc * MT_functions_new(int(*compare)(struct triple *, struct quaddata *), struct quaddata **(*divide_data)(struct quaddata *, int, double), int(*add_data)(struct triple *, struct quaddata *, double), int(*intersect)(struct quaddata *, struct quaddata *), int(*division_check)(struct quaddata *, int), int(*get_points)(struct quaddata *, struct quaddata *, int))
Definition: qtree.c:20
int(* add_data)()
Definition: qtree.h:24
struct multtree * MT_tree_new(struct quaddata *data, struct multtree **leafs, struct multtree *parent, int multant)
Definition: qtree.c:60
int
Definition: g3dcolor.c:48
struct multfunc * functions
Definition: qtree.h:32
Definition: qtree.h:20
int kmax
Definition: qtree.h:34
int MT_region_data(struct tree_info *info, struct multtree *tree, struct quaddata *data, int MAX, int n_leafs)
Definition: qtree.c:165
int MT_insert(struct triple *point, struct tree_info *info, struct multtree *tree, int n_leafs)
Definition: qtree.c:78
Definition: qtree.h:38
struct multtree * parent
Definition: qtree.h:42
struct multtree * root
Definition: qtree.h:35
int(* division_check)()
Definition: qtree.h:26
int MT_divide(struct tree_info *info, struct multtree *tree, int n_leafs)
Definition: qtree.c:137
struct multtree ** leafs
Definition: qtree.h:41
int multant
Definition: qtree.h:43