GRASS GIS 8 Programmer's Manual 8.2.1(2023)-exported
qtree.h
Go to the documentation of this file.
1/*!
2 * \file qtree.c
3 *
4 * \author
5 * H. Mitasova, I. Kosinovsky, D. Gerdes, Fall 1993,
6 * University of Illinois and
7 * US Army Construction Engineering Research Lab
8 *
9 * \author H. Mitasova (University of Illinois),
10 * \author I. Kosinovsky, (USA-CERL)
11 * \author D.Gerdes (USA-CERL)
12 *
13 * \author updated/checked by Mitasova Nov. 96 (no changes necessary)
14 *
15 * \copyright
16 * (C) 1993-1996 by Helena Mitasova and the GRASS Development Team
17 *
18 * \copyright
19 * This program is free software under the
20 * GNU General Public License (>=v2).
21 * Read the file COPYING that comes with GRASS for details.
22 */
23
24
25#ifndef TREE_H
26
27#define TREE_H
28
29#define VOID_T char
30
31
32/*!
33 * Function table for a tree
34 *
35 * From object oriented point of view, this structure represents
36 * a class or a virtual table of functions/methods for a class.
37 */
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
49{
51 double dmin;
52 int kmax;
53 struct multtree *root;
54};
55
57{
58 struct quaddata *data;
59 struct multtree **leafs;
62};
63
64struct 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));
73struct tree_info *MT_tree_info_new(struct multtree *, struct multfunc *,
74 double, int);
75struct multtree *MT_tree_new(struct quaddata *, struct multtree **,
76 struct multtree *, int);
77int MT_insert(struct triple *, struct tree_info *, struct multtree *, int);
78int MT_divide(struct tree_info *, struct multtree *, int);
79int MT_region_data(struct tree_info *, struct multtree *, struct quaddata *,
80 int, int);
81
82#endif
struct tree_info * MT_tree_info_new(struct multtree *, struct multfunc *, double, int)
Definition: qtree.c:57
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))
int MT_divide(struct tree_info *, struct multtree *, int)
Definition: qtree.c:158
int MT_insert(struct triple *, struct tree_info *, struct multtree *, int)
Definition: qtree.c:105
int MT_region_data(struct tree_info *, struct multtree *, struct quaddata *, int, int)
Definition: qtree.c:194
struct multtree * MT_tree_new(struct quaddata *, struct multtree **, struct multtree *, int)
Definition: qtree.c:73
Definition: qtree.h:39
int(* intersect)()
Definition: qtree.h:43
int(* compare)()
Definition: qtree.h:40
int(* get_points)()
Definition: qtree.h:45
int(* division_check)()
Definition: qtree.h:44
int(* add_data)()
Definition: qtree.h:42
Definition: qtree.h:57
struct multtree ** leafs
Definition: qtree.h:59
struct quaddata * data
Definition: qtree.h:58
struct multtree * parent
Definition: qtree.h:60
int multant
Definition: qtree.h:61
struct multtree * root
Definition: qtree.h:53
int kmax
Definition: qtree.h:52
struct multfunc * functions
Definition: qtree.h:50
double dmin
Definition: qtree.h:51