Template Class Octree

Class Documentation

template<typename T>
class Octree

Implementation of a k-dimensional octree for the purpose of Barnes-Hut approximation.

Public Functions

Octree() = default

Default constructor. No additional effect.

Octree(const std::vector<Vector> &points)

Constructor that puts the points in points into the octree.

Parameters:

points[in] Points to be inserted into the octree as initialization.

void recomputeTree(const std::vector<Vector> &points)

Clears current content and inserts points in points into the octree.

Parameters:

points[in] Points to be inserted into the octree.

inline std::vector<std::pair<count, Point<T>>> approximateDistance(const Point<T> &p, double theta) const
inline void approximateDistance(const Point<T> &p, double theta, std::vector<std::pair<count, Point<T>>> &result) const
template<typename L>
inline void approximateDistance(const Point<T> &p, double theta, L &handle) const
inline std::string toString()
Returns:

String label of the octree’s root node.