split.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. /*-----------------------------------------------------------------------------
  18. | Definitions and global variables.
  19. -----------------------------------------------------------------------------*/
  20. /* METHOD 0: R-Tree, quadratic split */
  21. /* METHOD 1: R*-Tree split */
  22. #define METHOD 1
  23. struct PartitionVars {
  24. int partition[MAXCARD + 1];
  25. int total, minfill;
  26. int taken[MAXCARD + 1];
  27. int count[2];
  28. struct Rect cover[2];
  29. RectReal area[2];
  30. };
  31. extern struct Branch BranchBuf[MAXCARD + 1];
  32. extern int BranchCount;
  33. extern struct Rect CoverSplit;
  34. extern RectReal CoverSplitArea;
  35. /* variables for finding a partition */
  36. extern struct PartitionVars Partitions[1];
  37. extern void RTreeInitPVars(struct PartitionVars *, int, int);