IntervalTree.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #pragma once
  2. #include "FileWriterInterface.h"
  3. namespace tecplot
  4. {
  5. namespace ___3933
  6. {
  7. class IntervalTree
  8. {
  9. UNCOPYABLE_CLASS(IntervalTree);
  10. public:
  11. typedef ___2090::SubzoneIndex_t TreeIndex_t;
  12. typedef std::vector<TreeIndex_t> TreeIndexVector;
  13. static TreeIndex_t const BAD_TREE_INDEX = ___2090::INVALID_SUBZONE_OFFSET;
  14. static TreeIndex_t const MAX_TREE_INDEX = ___2090::MAX_SUBZONE_OFFSET;
  15. private:
  16. struct TreeNode
  17. {
  18. double strikeValue;
  19. TreeIndex_t ___3681;
  20. TreeIndex_t size;
  21. TreeIndex_t left;
  22. TreeIndex_t right;
  23. ___372 operator==(TreeNode const &___2888) const { return strikeValue == ___2888.strikeValue && ___3681 == ___2888.___3681 && size == ___2888.size && left == ___2888.left && right == ___2888.right; }
  24. };
  25. TreeIndex_t m_root;
  26. TreeIndex_t m_numTreeNodes;
  27. std::vector<TreeNode> m_treeNodes;
  28. TreeIndex_t m_maxNumIntervalsReserved;
  29. TreeIndex_t m_curNumIntervals;
  30. std::vector<double> m_minimums;
  31. std::vector<double> m_maximums;
  32. TreeIndex_t m_numAlDhEntries;
  33. TreeIndexVector m_alEntries;
  34. TreeIndexVector m_dhEntries;
  35. double medianOfVector(std::vector<double> &arrayValues, TreeIndex_t ___2795);
  36. TreeIndex_t constructNode(TreeIndexVector const &list, TreeIndex_t ___2812);
  37. void queryNode(TreeIndex_t nodeOffset, double ___4314, TreeIndexVector &intervalList);
  38. ___372 minAscendingCompare(TreeIndex_t i, TreeIndex_t ___2105);
  39. ___372 maxDescendingCompare(TreeIndex_t i, TreeIndex_t ___2105);
  40. static ___372 encodeAsciiTreeNodeValue(char *str, TreeNode const &treeNode);
  41. ___372 ___4550(FileWriterInterface &file, char const *___972, ___4636 ___1251);
  42. ___372 ___4479(FileWriterInterface &file, char const *___972, ___4636 ___1251);
  43. ___372 ___4505(FileWriterInterface &file, char const *___972, ___4636 ___1251);
  44. public:
  45. IntervalTree() : m_root(BAD_TREE_INDEX), m_numTreeNodes(0), m_maxNumIntervalsReserved(0), m_curNumIntervals(0), m_numAlDhEntries(0) {}
  46. ~IntervalTree() {}
  47. ___372 addInterval(double minValue, double maxValue);
  48. ___372 addIntervalsMinMaxArray(TreeIndex_t numMinMaxes, ___2481 const &arrayMinMaxes);
  49. void queryIntervals(double ___4314, TreeIndexVector &intervalList);
  50. ___372 constructTree();
  51. ___372 writeTreeToFile(FileWriterInterface &file, ___1172 zone);
  52. ___372 readTreeFromFile(FileWriterInterface &file);
  53. };
  54. }
  55. }