split.q.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #pragma once
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. /*-----------------------------------------------------------------------------
  15. | Definitions and global variables.
  16. -----------------------------------------------------------------------------*/
  17. #include <label/rectangle.h>
  18. #include <label/index.h>
  19. #include <stdint.h>
  20. #ifndef METHODS
  21. #define METHODS 1
  22. #endif /*METHODS*/
  23. /* variables for finding a partition */
  24. struct PartitionVars {
  25. int partition[NODECARD + 1];
  26. int taken[NODECARD + 1];
  27. int count[2];
  28. struct Rect cover[2];
  29. uint64_t area[2];
  30. };
  31. typedef struct split_q_s {
  32. struct Branch BranchBuf[NODECARD + 1];
  33. struct Rect CoverSplit;
  34. uint64_t CoverSplitArea;
  35. struct PartitionVars Partitions[METHODS];
  36. } SplitQ_t;
  37. void SplitNode(RTree_t *, Node_t *, Branch_t *, Node_t **);
  38. #ifdef __cplusplus
  39. }
  40. #endif