GRASS GIS 8 Programmer's Manual  8.4.0dev(2024)-8cbe8fef7c
card.c
Go to the documentation of this file.
1 /****************************************************************************
2  * MODULE: R-Tree library
3  *
4  * AUTHOR(S): Antonin Guttman - original code
5  * Daniel Green (green@superliminal.com) - major clean-up
6  * and implementation of bounding spheres
7  * Markus Metz - file-based and memory-based R*-tree
8  *
9  * PURPOSE: Multidimensional index
10  *
11  * COPYRIGHT: (C) 2010 by the GRASS Development Team
12  *
13  * This program is free software under the GNU General Public
14  * License (>=v2). Read the file COPYING that comes with GRASS
15  * for details.
16  *****************************************************************************/
17 
18 #include "index.h"
19 #include "card.h"
20 
21 static int set_max(int *which, int new_max)
22 {
23  if (2 > new_max || new_max > MAXCARD)
24  return 0;
25  *which = new_max;
26  return 1;
27 }
28 
29 int RTreeSetNodeMax(int new_max, struct RTree *t)
30 {
31  return set_max(&(t->nodecard), new_max);
32 }
33 
34 int RTreeSetLeafMax(int new_max, struct RTree *t)
35 {
36  return set_max(&(t->leafcard), new_max);
37 }
38 
39 int RTreeGetNodeMax(struct RTree *t)
40 {
41  return t->nodecard;
42 }
43 
44 int RTreeGetLeafMax(struct RTree *t)
45 {
46  return t->leafcard;
47 }
int RTreeSetLeafMax(int new_max, struct RTree *t)
Definition: card.c:34
int RTreeGetNodeMax(struct RTree *t)
Definition: card.c:39
int RTreeGetLeafMax(struct RTree *t)
Definition: card.c:44
int RTreeSetNodeMax(int new_max, struct RTree *t)
Definition: card.c:29
double t
Definition: r_raster.c:39
#define MAXCARD
Definition: rtree.h:44
Definition: rtree.h:123