GRASS Programmer's Manual  6.4.2(2012)
qtree.h
Go to the documentation of this file.
00001 
00002 /*-
00003  * Written by H. Mitasova, I. Kosinovsky, D. Gerdes Fall 1993
00004  * University of Illinois
00005  * US Army Construction Engineering Research Lab  
00006  * Copyright 1993, H. Mitasova (University of Illinois),
00007  * I. Kosinovsky, (USA-CERL), and D.Gerdes (USA-CERL)   
00008  *
00009  * updated by Mitasova Nov. 96, no changes necessary 
00010  */
00011 
00012 
00013 #ifndef TREE_H
00014 
00015 #define TREE_H
00016 
00017 #define VOID_T char
00018 
00019 
00020 struct multfunc
00021 {
00022     int (*compare) ();
00023     struct quaddata **(*divide_data) ();
00024     int (*add_data) ();
00025     int (*intersect) ();
00026     int (*division_check) ();
00027     int (*get_points) ();
00028 };
00029 
00030 struct tree_info
00031 {
00032     struct multfunc *functions;
00033     double dmin;
00034     int kmax;
00035     struct multtree *root;
00036 };
00037 
00038 struct multtree
00039 {
00040     struct quaddata *data;
00041     struct multtree **leafs;
00042     struct multtree *parent;
00043     int multant;
00044 };
00045 
00046 struct multfunc *MT_functions_new(int (*)(struct triple *, struct quaddata *),
00047                                   struct quaddata **(*)(struct quaddata *,
00048                                                         int, double),
00049                                   int (*)(struct triple *, struct quaddata *,
00050                                           double), int (*)(struct quaddata *,
00051                                                            struct quaddata *),
00052                                   int (*)(struct quaddata *, int),
00053                                   int (*)(struct quaddata *,
00054                                           struct quaddata *, int));
00055 struct tree_info *MT_tree_info_new(struct multtree *, struct multfunc *,
00056                                    double, int);
00057 struct multtree *MT_tree_new(struct quaddata *, struct multtree **,
00058                              struct multtree *, int);
00059 int MT_insert(struct triple *, struct tree_info *, struct multtree *, int);
00060 int MT_divide(struct tree_info *, struct multtree *, int);
00061 int MT_region_data(struct tree_info *, struct multtree *, struct quaddata *,
00062                    int, int);
00063 
00064 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines