GRASS 8 Programmer's Manual
8.5.0(2026)-8d6ceba290
Toggle main menu visibility
Loading...
Searching...
No Matches
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
#ifndef TREE_H
25
26
#define TREE_H
27
28
#define VOID_T char
29
30
/*!
31
* Function table for a tree
32
*
33
* From object oriented point of view, this structure represents
34
* a class or a virtual table of functions/methods for a class.
35
*/
36
struct
multfunc
{
37
int (*
compare
)(
struct
triple
*,
struct
quaddata
*);
38
struct
quaddata
**(*divide_data)(
struct
quaddata
*, int, double);
39
int (*
add_data
)(
struct
triple
*,
struct
quaddata
*, double);
40
int (*
intersect
)(
struct
quaddata
*,
struct
quaddata
*);
41
int (*
division_check
)(
struct
quaddata
*, int);
42
int (*
get_points
)(
struct
quaddata
*,
struct
quaddata
*, int);
43
};
44
45
struct
tree_info
{
46
struct
multfunc
*
functions
;
47
double
dmin
;
48
int
kmax
;
49
struct
multtree
*
root
;
50
};
51
52
struct
multtree
{
53
struct
quaddata
*
data
;
54
struct
multtree
**
leafs
;
55
struct
multtree
*
parent
;
56
int
multant
;
57
};
58
59
struct
multfunc
*
60
MT_functions_new
(
int
(*)(
struct
triple
*,
struct
quaddata
*),
61
struct
quaddata
**(*)(
struct
quaddata
*,
int
,
double
),
62
int
(*)(
struct
triple
*,
struct
quaddata
*,
double
),
63
int
(*)(
struct
quaddata
*,
struct
quaddata
*),
64
int
(*)(
struct
quaddata
*,
int
),
65
int
(*)(
struct
quaddata
*,
struct
quaddata
*,
int
));
66
struct
tree_info
*
MT_tree_info_new
(
struct
multtree
*,
struct
multfunc
*,
double
,
67
int
);
68
struct
multtree
*
MT_tree_new
(
struct
quaddata
*,
struct
multtree
**,
69
struct
multtree
*,
int
);
70
int
MT_insert
(
struct
triple
*,
struct
tree_info
*,
struct
multtree
*,
int
);
71
int
MT_divide
(
struct
tree_info
*,
struct
multtree
*,
int
);
72
int
MT_region_data
(
struct
tree_info
*,
struct
multtree
*,
struct
quaddata
*,
73
int
,
int
);
74
75
#endif
MT_tree_info_new
struct tree_info * MT_tree_info_new(struct multtree *, struct multfunc *, double, int)
Definition
qtree.c:55
MT_functions_new
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))
MT_divide
int MT_divide(struct tree_info *, struct multtree *, int)
Definition
qtree.c:154
MT_insert
int MT_insert(struct triple *, struct tree_info *, struct multtree *, int)
Definition
qtree.c:103
MT_region_data
int MT_region_data(struct tree_info *, struct multtree *, struct quaddata *, int, int)
Definition
qtree.c:186
MT_tree_new
struct multtree * MT_tree_new(struct quaddata *, struct multtree **, struct multtree *, int)
Definition
qtree.c:72
multfunc
Definition
qtree.h:36
multfunc::compare
int(* compare)(struct triple *, struct quaddata *)
Definition
qtree.h:37
multfunc::division_check
int(* division_check)(struct quaddata *, int)
Definition
qtree.h:41
multfunc::get_points
int(* get_points)(struct quaddata *, struct quaddata *, int)
Definition
qtree.h:42
multfunc::add_data
int(* add_data)(struct triple *, struct quaddata *, double)
Definition
qtree.h:39
multfunc::intersect
int(* intersect)(struct quaddata *, struct quaddata *)
Definition
qtree.h:40
multtree
Definition
qtree.h:52
multtree::leafs
struct multtree ** leafs
Definition
qtree.h:54
multtree::data
struct quaddata * data
Definition
qtree.h:53
multtree::parent
struct multtree * parent
Definition
qtree.h:55
multtree::multant
int multant
Definition
qtree.h:56
quaddata
Definition
dataquad.h:45
tree_info
Definition
qtree.h:45
tree_info::root
struct multtree * root
Definition
qtree.h:49
tree_info::kmax
int kmax
Definition
qtree.h:48
tree_info::functions
struct multfunc * functions
Definition
qtree.h:46
tree_info::dmin
double dmin
Definition
qtree.h:47
triple
Definition
dataquad.h:38
rst
qtree
qtree.h
Generated on
for GRASS 8 Programmer's Manual by
1.17.0