Template Class QuadtreeCartesianEuclid

Class Documentation

template<class T>
class QuadtreeCartesianEuclid

Public Functions

inline QuadtreeCartesianEuclid(Point<double> lower = Point<double>(0.0, 0.0), Point<double> upper = Point<double>(1.0, 1.0), bool theoreticalSplit = false, count capacity = 1000)
Parameters:
  • lower – Minimal coordinates of region

  • upper – Maximal coordinates of region (excluded)

  • capacity – Number of points a leaf cell can store before splitting

  • splitTheoretical – Whether to split in a theoretically optimal way or in a way to decrease measured running times

inline QuadtreeCartesianEuclid(const vector<Point<double>> &positions, const vector<T> &content, bool theoreticalSplit = false, count capacity = 1000)
inline void addContent(T newcomer, Point<double> pos)
Parameters:
  • newcomer – content to be added at point x

  • angle – angular coordinate of x

  • R – radial coordinate of x

inline bool removeContent(T toRemove, Point<double> pos)
Parameters:
  • newcomer – content to be removed at point x

  • angle – angular coordinate of x

  • R – radial coordinate of x

inline vector<T> getElements() const

Get all elements, regardless of position

Returns:

vector<T> of elements

inline void extractCoordinates(vector<Point<double>> &posContainer) const
inline void getElementsInEuclideanCircle(const Point<double> circleCenter, const double radius, vector<T> &circleDenizens) const
template<typename L>
inline count getElementsProbabilistically(Point<double> euQuery, L prob, vector<T> &circleDenizens)
inline void recount()
inline count size() const
inline count height() const
inline count countLeaves() const
inline index indexSubtree(index nextID)
inline index getCellID(Point<double> pos) const
inline void reindex()
inline void trim()

trims the vectors used to hold the content in the leaf cells. Reduces memory usage, makes changes slower