GRASS 8 Programmer's Manual 8.6.0dev(2026)-8843f13794
Loading...
Searching...
No Matches
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 * SPDX-FileCopyrightText: 2010 GRASS Development Team
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *****************************************************************************/
14
15#include "index.h"
16#include "card.h"
17
18static int set_max(int *which, int new_max)
19{
20 if (2 > new_max || new_max > MAXCARD)
21 return 0;
22 *which = new_max;
23 return 1;
24}
25
26int RTreeSetNodeMax(int new_max, struct RTree *t)
27{
28 return set_max(&(t->nodecard), new_max);
29}
30
31int RTreeSetLeafMax(int new_max, struct RTree *t)
32{
33 return set_max(&(t->leafcard), new_max);
34}
35
37{
38 return t->nodecard;
39}
40
42{
43 return t->leafcard;
44}
int RTreeSetLeafMax(int new_max, struct RTree *t)
Definition card.c:31
int RTreeGetNodeMax(struct RTree *t)
Definition card.c:36
int RTreeGetLeafMax(struct RTree *t)
Definition card.c:41
int RTreeSetNodeMax(int new_max, struct RTree *t)
Definition card.c:26
double t
Definition r_raster.c:37
#define MAXCARD
Definition rtree.h:41
Definition rtree.h:120