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