GRASS Programmer's Manual 6.4.1(2011)
card.c
Go to the documentation of this file.
00001 
00002 /****************************************************************************
00003 * MODULE:       R-Tree library 
00004 *              
00005 * AUTHOR(S):    Antonin Guttman - original code
00006 *               Daniel Green (green@superliminal.com) - major clean-up
00007 *                               and implementation of bounding spheres
00008 *               
00009 * PURPOSE:      Multidimensional index
00010 *
00011 * COPYRIGHT:    (C) 2001 by the GRASS Development Team
00012 *
00013 *               This program is free software under the GNU General Public
00014 *               License (>=v2). Read the file COPYING that comes with GRASS
00015 *               for details.
00016 *****************************************************************************/
00017 
00018 #include "index.h"
00019 #include "card.h"
00020 
00021 int NODECARD = MAXCARD;
00022 int LEAFCARD = MAXCARD;
00023 
00024 static int set_max(int *which, int new_max)
00025 {
00026     if (2 > new_max || new_max > MAXCARD)
00027         return 0;
00028     *which = new_max;
00029     return 1;
00030 }
00031 
00032 int RTreeSetNodeMax(int new_max)
00033 {
00034     return set_max(&NODECARD, new_max);
00035 }
00036 int RTreeSetLeafMax(int new_max)
00037 {
00038     return set_max(&LEAFCARD, new_max);
00039 }
00040 int RTreeGetNodeMax(void)
00041 {
00042     return NODECARD;
00043 }
00044 int RTreeGetLeafMax(void)
00045 {
00046     return LEAFCARD;
00047 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines