card.h 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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. #ifndef __CARD__
  18. #define __CARD__
  19. /* balance criteria for node splitting */
  20. /* NOTE: can be changed if needed but
  21. * must be >= 2 and <= (t)->[nodecard|leafcard] / 2 */
  22. #define MinNodeFill(t) ((t)->minfill_node_split)
  23. #define MinLeafFill(t) ((t)->minfill_leaf_split)
  24. #define MAXKIDS(level, t) ((level) > 0 ? (t)->nodecard : (t)->leafcard)
  25. #define MINFILL(level, t) ((level) > 0 ? (t)->minfill_node_split : (t)->minfill_leaf_split)
  26. #endif