~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to lib/vector/rtree/card.h

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
* AUTHOR(S):    Antonin Guttman - original code
6
6
*               Daniel Green (green@superliminal.com) - major clean-up
7
7
*                               and implementation of bounding spheres
 
8
*               Markus Metz - file-based and memory-based R*-tree
8
9
*               
9
10
* PURPOSE:      Multidimensional index
10
11
*
11
 
* COPYRIGHT:    (C) 2001 by the GRASS Development Team
 
12
* COPYRIGHT:    (C) 2010 by the GRASS Development Team
12
13
*
13
14
*               This program is free software under the GNU General Public
14
15
*               License (>=v2). Read the file COPYING that comes with GRASS
18
19
#ifndef __CARD__
19
20
#define __CARD__
20
21
 
21
 
extern int NODECARD;
22
 
extern int LEAFCARD;
23
 
 
24
22
/* balance criteria for node splitting */
25
 
/* NOTE: can be changed if needed. */
26
 
#define MinNodeFill (NODECARD / 2)
27
 
#define MinLeafFill (LEAFCARD / 2)
 
23
/* NOTE: can be changed if needed but
 
24
 * must be >= 2 and <= (t)->[nodecard|leafcard] / 2 */
 
25
#define MinNodeFill(t) ((t)->minfill_node_split)
 
26
#define MinLeafFill(t) ((t)->minfill_leaf_split)
28
27
 
29
 
#define MAXKIDS(n) ((n)->level > 0 ? NODECARD : LEAFCARD)
30
 
#define MINFILL(n) ((n)->level > 0 ? MinNodeFill : MinLeafFill)
 
28
#define MAXKIDS(level, t) ((level) > 0 ? (t)->nodecard : (t)->leafcard)
 
29
#define MINFILL(level, t) ((level) > 0 ? (t)->minfill_node_split : (t)->minfill_leaf_split)
31
30
 
32
31
#endif